Documentation ¶
Index ¶
- Constants
- Variables
- type CachingStore
- func (c *CachingStore) Delete(key string, ctx context.Context) error
- func (c *CachingStore) Get(key string, ctx context.Context) (reader io.ReadCloser, err error)
- func (c *CachingStore) Init(ctx context.Context) error
- func (c *CachingStore) List(ctx context.Context) (util.Iterator[io.ReadCloser], error)
- func (c *CachingStore) Put(key string, reader io.ReadCloser, ctx context.Context) error
- func (c *CachingStore) PutAsync(key string, reader io.ReadCloser, ctx context.Context) (nats.PubAckFuture, error)
- func (c *CachingStore) Stat(key string, ctx context.Context) (ok bool, err error)
- type CdcStore
- func (c *CdcStore) Delete(digest Digest, ctx context.Context) error
- func (c *CdcStore) Get(digest Digest, ctx context.Context) (io.ReadCloser, error)
- func (c *CdcStore) Init(ctx context.Context) error
- func (c *CdcStore) List(ctx context.Context) (util.Iterator[io.ReadCloser], error)
- func (c *CdcStore) Put(reader io.ReadCloser, ctx context.Context) (*Digest, error)
- func (c *CdcStore) Stat(digest Digest, ctx context.Context) (ok bool, err error)
- type Digest
- type NatsStore
- func (n *NatsStore) Delete(key string, ctx context.Context) error
- func (n *NatsStore) Get(key string, ctx context.Context) (io.ReadCloser, error)
- func (n *NatsStore) Init(ctx context.Context) error
- func (n *NatsStore) List(ctx context.Context) (util.Iterator[io.ReadCloser], error)
- func (n *NatsStore) Put(key string, reader io.ReadCloser, ctx context.Context) error
- func (n *NatsStore) PutAsync(key string, reader io.ReadCloser, ctx context.Context) (nats.PubAckFuture, error)
- func (n *NatsStore) Stat(key string, ctx context.Context) (ok bool, err error)
- type Store
Constants ¶
View Source
const (
ErrKeyNotFound = errors.ConstError("key not found")
)
Variables ¶
View Source
var ChunkOptions = fastcdc.Options{
MinSize: 1 * 1024 * 1024,
AverageSize: 4 * 1024 * 1024,
MaxSize: (8 * 1024 * 1024) - 1024,
}
Functions ¶
This section is empty.
Types ¶
type CachingStore ¶
func (*CachingStore) Get ¶
func (c *CachingStore) Get(key string, ctx context.Context) (reader io.ReadCloser, err error)
func (*CachingStore) List ¶
func (c *CachingStore) List(ctx context.Context) (util.Iterator[io.ReadCloser], error)
func (*CachingStore) Put ¶
func (c *CachingStore) Put(key string, reader io.ReadCloser, ctx context.Context) error
func (*CachingStore) PutAsync ¶
func (c *CachingStore) PutAsync(key string, reader io.ReadCloser, ctx context.Context) (nats.PubAckFuture, error)
type NatsStore ¶
type NatsStore struct { Conn *nats.Conn StreamConfig *nats.StreamConfig SubjectPrefix string }
type Store ¶
type Store interface { Init(ctx context.Context) error Get(key string, ctx context.Context) (io.ReadCloser, error) Put(key string, reader io.ReadCloser, ctx context.Context) error PutAsync(key string, reader io.ReadCloser, ctx context.Context) (nats.PubAckFuture, error) List(ctx context.Context) (util.Iterator[io.ReadCloser], error) Stat(key string, ctx context.Context) (bool, error) Delete(key string, ctx context.Context) error }
Click to show internal directories.
Click to hide internal directories.