gcs

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBucketClient

func NewBucketClient(ctx context.Context, cfg Config, name string, logger log.Logger) (objstore.Bucket, error)

NewBucketClient creates a new GCS bucket client

Types

type Config

type Config struct {
	BucketName      string         `yaml:"bucket_name"`
	ServiceAccount  flagext.Secret `yaml:"service_account" doc:"description_method=GCSServiceAccountLongDescription"`
	ChunkBufferSize int            `yaml:"chunk_buffer_size"`

	// Allow upstream callers to inject a round tripper
	Transport http.RoundTripper `yaml:"-"`
}

Config holds the config options for GCS backend

func (*Config) GCSServiceAccountLongDescription added in v3.3.0

func (cfg *Config) GCSServiceAccountLongDescription() string

func (*Config) GCSServiceAccountShortDescription added in v3.3.0

func (cfg *Config) GCSServiceAccountShortDescription() string

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers the flags for GCS storage

func (*Config) RegisterFlagsWithPrefix

func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

RegisterFlagsWithPrefix registers the flags for GCS storage with the provided prefix

Jump to

Keyboard shortcuts

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