gcp

package
v0.0.0-...-2fb9ad5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	GcsClient *storage.Client
}

This should satify interface for FirehoseBackend

func NewBackend

func NewBackend(client *storage.Client) *Backend

NewBackend creates a Firehose on GCP The provider metadata produced by this Backend will have concrete type: gcp.Metadata

func (*Backend) CreateReader

func (b *Backend) CreateReader(ctx context.Context, uploadBucket string, uploadLocation string) (io.ReadCloser, error)

func (*Backend) CreateWriter

func (b *Backend) CreateWriter(ctx context.Context, uploadBucket string, uploadLocation string) (io.WriteCloser, error)

func (*Backend) DeleteFile

func (b *Backend) DeleteFile(ctx context.Context, bucket string, location string) error

func (*Backend) GetDeploymentId

func (b *Backend) GetDeploymentId(ctx context.Context) string

func (*Backend) GetNodeId

func (b *Backend) GetNodeId(ctx context.Context) string

func (*Backend) ListFilesPrefix

func (b *Backend) ListFilesPrefix(ctx context.Context, bucket string, prefix string) ([]string, error)

func (*Backend) ReadFile

func (b *Backend) ReadFile(ctx context.Context, readBucket string, readLocation string) ([]byte, error)

func (*Backend) UploadFile

func (b *Backend) UploadFile(ctx context.Context, data []byte, uploadBucket string, uploadLocation string) error

func (*Backend) WriteLeaderFile

func (b *Backend) WriteLeaderFile(ctx context.Context, metadataBucket string, fileContents []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL