gcs

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: AGPL-3.0 Imports: 10 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"`
	HTTP           HTTPConfig     `yaml:"http"`
}

Config holds the config options for GCS backend

func (*Config) GCSServiceAccountLongDescription

func (cfg *Config) GCSServiceAccountLongDescription() string

func (*Config) GCSServiceAccountShortDescription

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

type HTTPConfig added in v1.13.0

type HTTPConfig struct {
	IdleConnTimeout       time.Duration `yaml:"idle_conn_timeout" category:"advanced"`
	ResponseHeaderTimeout time.Duration `yaml:"response_header_timeout" category:"advanced"`
	InsecureSkipVerify    bool          `yaml:"insecure_skip_verify" category:"advanced"`
	TLSHandshakeTimeout   time.Duration `yaml:"tls_handshake_timeout" category:"advanced"`
	ExpectContinueTimeout time.Duration `yaml:"expect_continue_timeout" category:"advanced"`
	MaxIdleConns          int           `yaml:"max_idle_conns" category:"advanced"`
	MaxIdleConnsPerHost   int           `yaml:"max_idle_conns_per_host" category:"advanced"`
	MaxConnsPerHost       int           `yaml:"max_conns_per_host" category:"advanced"`
}

func (*HTTPConfig) RegisterFlagsWithPrefix added in v1.13.0

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

RegisterFlagsWithPrefix registers the flags for s3 storage with the provided prefix

Jump to

Keyboard shortcuts

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