huawei

package
v1.3.0-rc.1.0...-65594da Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ObsRequestDuration = instrument.NewHistogramCollector(prometheus.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: "cortex",
		Name:      "obs_request_duration_seconds",
		Help:      "Time spent doing Obs requests.",
		Buckets:   []float64{.025, .05, .1, .25, .5, 1, 2},
	}, []string{"operation", "status_code"}))
)

Functions

This section is empty.

Types

type ObsStorage

type ObsStorage struct {
	// contains filtered or unexported fields
}

func NewObsStorage

func NewObsStorage(cfg *ObsStorageConfig) (*ObsStorage, error)

func (*ObsStorage) DeleteObject

func (b *ObsStorage) DeleteObject(ctx context.Context, objectKey string) error

func (*ObsStorage) GetObject

func (b *ObsStorage) GetObject(ctx context.Context, objectKey string) (io.ReadCloser, error)

func (*ObsStorage) List

func (b *ObsStorage) List(ctx context.Context, prefix string, delimiter string) ([]chunk.StorageObject, []chunk.StorageCommonPrefix, error)

func (*ObsStorage) PutObject

func (b *ObsStorage) PutObject(ctx context.Context, objectKey string, object io.ReadSeeker) error

func (*ObsStorage) Stop

func (b *ObsStorage) Stop()

type ObsStorageConfig

type ObsStorageConfig struct {
	AccessKey string `yaml:"access_key"`
	SecretKey string `yaml:"secret_key"`
	Endpoint  string `yaml:"endpoint"`
	Bucket    string `yaml:"bucket"`
}

func (*ObsStorageConfig) RegisterFlags

func (c *ObsStorageConfig) RegisterFlags(f *flag.FlagSet)

func (*ObsStorageConfig) RegisterFlagsWithPrefix

func (c *ObsStorageConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

func (*ObsStorageConfig) Validate

func (c *ObsStorageConfig) Validate() error

Jump to

Keyboard shortcuts

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