Documentation
¶
Index ¶
- Constants
- func Copy(ctx context.Context, src Reading, dst Writing, cids ...blobcache.CID) error
- func ExistsUnit(ctx context.Context, s Exister, cid blobcache.CID) (bool, error)
- func Hash(x []byte) blobcache.CID
- func NewMem() *schema.MemStore
- type CopyFrom
- type Exister
- type ID
- type MemSet
- func (ms MemSet) Add(ctx context.Context, id ID) error
- func (ms MemSet) Count() int
- func (ms MemSet) Delete(ctx context.Context, id ID) error
- func (ms MemSet) Exists(ctx context.Context, id ID) (bool, error)
- func (ms MemSet) List(ctx context.Context, span cadata.Span, ids []blobcache.CID) (int, error)
- type RW
- type RWD
- type Reading
- type Set
- type Store
- type Void
- type Writing
Constants ¶
View Source
const MaxSize = 1 << 21
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Reading ¶
type Reading interface {
Get(ctx context.Context, cid blobcache.CID, buf []byte) (int, error)
Exists(ctx context.Context, cids []blobcache.CID, dst []bool) error
MaxSize() int
}
Reading is used for read-only operations.
func AssertReadOnly ¶
AssertReadOnly returns a new store backup by x, which will panic if it is modified.
Click to show internal directories.
Click to hide internal directories.