Documentation
¶
Index ¶
- type BlobStorage
- func (b *BlobStorage) DeleteObject(ctx context.Context, blobID string) error
- func (b *BlobStorage) GetObject(ctx context.Context, objectKey string) (io.ReadCloser, error)
- func (b *BlobStorage) List(ctx context.Context, prefix, delimiter string) ([]chunk.StorageObject, []chunk.StorageCommonPrefix, error)
- func (b *BlobStorage) PutObject(ctx context.Context, objectKey string, object io.ReadSeeker) error
- func (b *BlobStorage) Stop()
- type BlobStorageConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobStorage ¶
type BlobStorage struct {
// contains filtered or unexported fields
}
BlobStorage is used to interact with azure blob storage for setting or getting time series chunks. Implements ObjectStorage
func NewBlobStorage ¶
func NewBlobStorage(cfg *BlobStorageConfig) (*BlobStorage, error)
NewBlobStorage creates a new instance of the BlobStorage struct.
func (*BlobStorage) DeleteObject ¶ added in v0.7.0
func (b *BlobStorage) DeleteObject(ctx context.Context, blobID string) error
func (*BlobStorage) GetObject ¶ added in v0.7.0
func (b *BlobStorage) GetObject(ctx context.Context, objectKey string) (io.ReadCloser, error)
func (*BlobStorage) List ¶ added in v0.7.0
func (b *BlobStorage) List(ctx context.Context, prefix, delimiter string) ([]chunk.StorageObject, []chunk.StorageCommonPrefix, error)
List implements chunk.ObjectClient.
type BlobStorageConfig ¶
type BlobStorageConfig struct {
Environment string `yaml:"environment"`
ContainerName string `yaml:"container_name"`
AccountName string `yaml:"account_name"`
AccountKey flagext.Secret `yaml:"account_key"`
DownloadBufferSize int `yaml:"download_buffer_size"`
UploadBufferSize int `yaml:"upload_buffer_size"`
UploadBufferCount int `yaml:"upload_buffer_count"`
RequestTimeout time.Duration `yaml:"request_timeout"`
MaxRetries int `yaml:"max_retries"`
MinRetryDelay time.Duration `yaml:"min_retry_delay"`
MaxRetryDelay time.Duration `yaml:"max_retry_delay"`
}
BlobStorageConfig defines the configurable flags that can be defined when using azure blob storage.
func (*BlobStorageConfig) RegisterFlags ¶
func (c *BlobStorageConfig) RegisterFlags(f *flag.FlagSet)
RegisterFlags adds the flags required to config this to the given FlagSet
func (*BlobStorageConfig) RegisterFlagsWithPrefix ¶ added in v1.0.0
func (c *BlobStorageConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)
RegisterFlagsWithPrefix adds the flags required to config this to the given FlagSet
Click to show internal directories.
Click to hide internal directories.