package gcslog
import "golang.org/x/build/maintner/maintnerd/gcslog"
Package gcslog is an implementation of maintner.MutationSource and Logger for Google Cloud Storage.
Index ¶
- type GCSLog
- func NewGCSLog(ctx context.Context, bucketName string) (*GCSLog, error)
- func (gl *GCSLog) CopyFrom(src maintner.MutationSource) error
- func (gl *GCSLog) GetMutations(ctx context.Context) <-chan maintner.MutationStreamEvent
- func (gl *GCSLog) Log(m *maintpb.Mutation) error
- func (gl *GCSLog) RegisterHandlers(mux *http.ServeMux)
- func (gl *GCSLog) SetDebug(v bool)
Types ¶
type GCSLog ¶
type GCSLog struct {
// contains filtered or unexported fields
}
GCSLog logs mutations to GCS.
func NewGCSLog ¶
NewGCSLog creates a GCSLog that logs mutations to a given GCS bucket. If the bucket name contains a "/", the part after the slash will be a prefix for the segments.
func (*GCSLog) CopyFrom ¶
func (gl *GCSLog) CopyFrom(src maintner.MutationSource) error
CopyFrom is only used for the one-time migrate from disk-to-GCS code path.
func (*GCSLog) GetMutations ¶
func (gl *GCSLog) GetMutations(ctx context.Context) <-chan maintner.MutationStreamEvent
GetMutations returns a channel of mutations or related events. The channel will never be closed. All sends on the returned channel should select on the provided context.
func (*GCSLog) Log ¶
Log writes m to GCS after the buffer is full or after a periodic flush.
func (*GCSLog) RegisterHandlers ¶
RegisterHandlers adds handlers for the default paths (/logs and /logs/).
func (*GCSLog) SetDebug ¶
SetDebug controls whether verbose debugging is enabled on this log.
It must only be called before it's used.
Source Files ¶
gcslog.go
- Version
- v0.0.0-20250421191922-3619c213cff3 (latest)
- Published
- Apr 21, 2025
- Platform
- linux/amd64
- Imports
- 22 packages
- Last checked
- 2 months ago –
Tools for package owners.