uploader

package
v3.6.7 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// SHAPrefixSize is the size of the SHA prefix used for splitting object storage keys
	SHAPrefixSize int
}

func (*Config) RegisterFlagsWithPrefix

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

RegisterFlagsWithPrefix registers flags with the given prefix.

func (*Config) Validate

func (cfg *Config) Validate() error

type Uploader

type Uploader struct {
	SHAPrefixSize int
	// contains filtered or unexported fields
}

func New

func New(cfg Config, bucket objstore.Bucket, logger log.Logger) *Uploader

func (*Uploader) RegisterMetrics

func (d *Uploader) RegisterMetrics(reg prometheus.Registerer) error

func (*Uploader) UnregisterMetrics

func (d *Uploader) UnregisterMetrics(reg prometheus.Registerer)

func (*Uploader) Upload

func (d *Uploader) Upload(ctx context.Context, object *dataobj.Object) (key string, err error)

Upload uploads an object to the configured bucket and returns the key.

Jump to

Keyboard shortcuts

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