Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Base64Encoder = func(key string) string {
return base64.StdEncoding.EncodeToString([]byte(key))
}
Base64Encoder is used to encode chunk keys in base64 before storing/retrieving them from the ObjectClient
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is used to store chunks in object store backends
func NewClient ¶
func NewClient(store chunk.ObjectClient, encoder KeyEncoder) *Client
NewClient wraps the provided ObjectClient with a chunk.Client implementation
func (*Client) DeleteChunk ¶
func (o *Client) DeleteChunk(ctx context.Context, userID, chunkID string) error
GetChunks retrieves the specified chunks from the configured backend
func (*Client) GetChunks ¶
func (o *Client) GetChunks(ctx context.Context, chunks []chunk.Chunk) ([]chunk.Chunk, error)
GetChunks retrieves the specified chunks from the configured backend
type KeyEncoder ¶
type KeyEncoder func(string) string
KeyEncoder is used to encode chunk keys before writing/retrieving chunks from the underlying ObjectClient
Click to show internal directories.
Click to hide internal directories.