Documentation
¶
Overview ¶
Package datalake provides a BinaryStore implementation backed by Azure Data Lake Storage Gen2. Each named file maps 1:1 to a path inside the configured filesystem.
Index ¶
- func NewAzureDataLakeStorage(log logger.Logger) binarystore.BinaryStore
- type AzureDataLakeStorage
- func (a *AzureDataLakeStorage) Close() error
- func (a *AzureDataLakeStorage) Delete(ctx context.Context, req *binarystore.DeleteRequest) error
- func (a *AzureDataLakeStorage) Features() []binarystore.Feature
- func (a *AzureDataLakeStorage) Get(ctx context.Context, req *binarystore.GetRequest) (*binarystore.GetResponse, error)
- func (a *AzureDataLakeStorage) GetComponentMetadata() (metadataInfo contribMetadata.MetadataMap)
- func (a *AzureDataLakeStorage) Init(ctx context.Context, md binarystore.Metadata) error
- func (a *AzureDataLakeStorage) Set(ctx context.Context, req *binarystore.SetRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAzureDataLakeStorage ¶
func NewAzureDataLakeStorage(log logger.Logger) binarystore.BinaryStore
NewAzureDataLakeStorage returns a new AzureDataLakeStorage binary store.
Types ¶
type AzureDataLakeStorage ¶
type AzureDataLakeStorage struct {
// contains filtered or unexported fields
}
AzureDataLakeStorage implements binarystore.BinaryStore using Azure Data Lake Storage Gen2.
func (*AzureDataLakeStorage) Close ¶
func (a *AzureDataLakeStorage) Close() error
Close closes the underlying Azure Data Lake Storage client.
func (*AzureDataLakeStorage) Delete ¶
func (a *AzureDataLakeStorage) Delete(ctx context.Context, req *binarystore.DeleteRequest) error
Delete removes a path from Azure Data Lake Storage. If the path does not exist, binarystore.ErrFileNotFound is returned.
func (*AzureDataLakeStorage) Features ¶
func (a *AzureDataLakeStorage) Features() []binarystore.Feature
Features returns the optional features supported by this component.
func (*AzureDataLakeStorage) Get ¶
func (a *AzureDataLakeStorage) Get(ctx context.Context, req *binarystore.GetRequest) (*binarystore.GetResponse, error)
Get downloads binary data from Azure Data Lake Storage as a streaming reader.
The Data field of the returned GetResponse wraps the HTTP response body and must be closed by the caller when reading is complete.
func (*AzureDataLakeStorage) GetComponentMetadata ¶
func (a *AzureDataLakeStorage) GetComponentMetadata() (metadataInfo contribMetadata.MetadataMap)
GetComponentMetadata returns the metadata schema for this component, used by the Dapr metadata linter.
func (*AzureDataLakeStorage) Init ¶
func (a *AzureDataLakeStorage) Init(ctx context.Context, md binarystore.Metadata) error
Init initialises the Azure Data Lake Storage client from the component metadata.
func (*AzureDataLakeStorage) Set ¶
func (a *AzureDataLakeStorage) Set(ctx context.Context, req *binarystore.SetRequest) error
Set uploads binary data to Azure Data Lake Storage.
When req.Overwrite is false, the file is created with an If-None-Match: * access condition so that the server rejects the operation atomically if the path already exists, returning binarystore.ErrFileAlreadyExists. When req.Overwrite is true, the file is created or replaced without a condition check.