azure

package
v0.5.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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

NewBlobStorage creates a new instance of the BlobStorage struct.

func (*BlobStorage) GetChunks

func (b *BlobStorage) GetChunks(ctx context.Context, chunks []chunk.Chunk) ([]chunk.Chunk, error)

GetChunks retrieves the requested data chunks from blob storage.

func (*BlobStorage) PutChunks

func (b *BlobStorage) PutChunks(ctx context.Context, chunks []chunk.Chunk) error

PutChunks writes a set of chunks to azure blob storage using block blobs.

func (*BlobStorage) Stop

func (b *BlobStorage) Stop()

Stop is a no op, as there are no background workers with this driver currently

type BlobStorageConfig

type BlobStorageConfig struct {
	ContainerName      string        `yaml:"container_name"`
	AccountName        string        `yaml:"account_name"`
	AccountKey         string        `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

Jump to

Keyboard shortcuts

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