Documentation ¶
Index ¶
- Variables
- type ObsStorage
- func (b *ObsStorage) DeleteObject(ctx context.Context, objectKey string) error
- func (b *ObsStorage) GetObject(ctx context.Context, objectKey string) (io.ReadCloser, error)
- func (b *ObsStorage) List(ctx context.Context, prefix string, delimiter string) ([]chunk.StorageObject, []chunk.StorageCommonPrefix, error)
- func (b *ObsStorage) PutObject(ctx context.Context, objectKey string, object io.ReadSeeker) error
- func (b *ObsStorage) Stop()
- type ObsStorageConfig
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
Click to show internal directories.
Click to hide internal directories.