build: Index | Files

package gcslog

import ""

Package gcslog is an implementation of maintner.MutationSource and Logger for Google Cloud Storage.


Package Files


type GCSLog Uses

type GCSLog struct {
    // contains filtered or unexported fields

GCSLog logs mutations to GCS.

func NewGCSLog Uses

func NewGCSLog(ctx context.Context, bucketName string) (*GCSLog, error)

NewGCSLog creates a GCSLog that logs mutations to a given GCS bucket.

func (*GCSLog) CopyFrom Uses

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 Uses

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 Uses

func (gl *GCSLog) Log(m *maintpb.Mutation) error

Log writes m to GCS after the buffer is full or after a periodic flush.

func (*GCSLog) RegisterHandlers Uses

func (gl *GCSLog) RegisterHandlers(mux *http.ServeMux)

RegisterHandlers adds handlers for the default paths (/logs and /logs/).

Package gcslog imports 21 packages (graph) and is imported by 4 packages. Updated 2019-09-22. Refresh now. Tools for package owners.