Documentation ¶
Index ¶
- Constants
- func MultiPut(ctx context.Context, stores []MultiStoreUnit, name string, buffer []byte, ...) error
- func PipeIO(writer io.Writer, reader io.Reader) (n int64, err error)
- func ReadTee(ctx context.Context, sStore Store, source string, dStore Store, ...) ([]byte, error)
- type Attributes
- type MultiStoreUnit
- type NewKey
- type Store
- type StoreCRC
Constants ¶
View Source
const ( // Adding these to make code more readable when looking at Put Call NoOverWrite = true OverWrite = false )
View Source
const ( ErrNotFound errString = "not found" ErrForbidden errString = "forbidden" ErrNotSupported errString = "not supported" ErrExists errString = "exists already" ErrObjectTooBig errString = "object too big to be read into memory" )
View Source
const MaxObjectSizeInMemory = 2 * 1024 * 1024 * 1024 // 2 gigs
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MultiStoreUnit ¶
type Store ¶
type Store interface { String() string Has(context.Context, string) (bool, error) Get(context.Context, string) (io.ReadCloser, error) GetAttr(context.Context, string) (Attributes, error) GetAt(context.Context, string) (io.ReaderAt, error) Touch(context.Context, string) error Put(context.Context, string, io.Reader, NewKey) error Delete(context.Context, string) error Keys(context.Context) ([]string, error) Clear(context.Context) error KeysPrefix(ctx context.Context, pageToken string, prefix string, delimiter string, count int) ([]string, string, error) }
Store implementations know how to write entries to a K/V model.Store.
Typically this is something file system-like. Examples are S3, local FS, NFS, ... Implementations of this interface are assumed to be fairly simple.
func Instrument ¶
Click to show internal directories.
Click to hide internal directories.