Documentation
¶
Index ¶
- type LinkSet
- type System
- type Tx
- type UnsaltedStore
- func (v UnsaltedStore) Delete(ctx context.Context, cids []blobcache.CID) error
- func (v UnsaltedStore) Exists(ctx context.Context, cids []blobcache.CID, dst []bool) error
- func (v UnsaltedStore) Get(ctx context.Context, cid blobcache.CID, buf []byte) (int, error)
- func (v UnsaltedStore) Hash(data []byte) blobcache.CID
- func (v UnsaltedStore) MaxSize() int
- func (v UnsaltedStore) Post(ctx context.Context, data []byte) (blobcache.CID, error)
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tx ¶
type Tx interface {
Params() blobcache.TxParams
Commit(ctx context.Context) error
Abort(ctx context.Context) error
Save(ctx context.Context, src []byte) error
Load(ctx context.Context, dst *[]byte) error
Post(ctx context.Context, data []byte, opts blobcache.PostOpts) (blobcache.CID, error)
Get(ctx context.Context, cid blobcache.CID, buf []byte, opts blobcache.GetOpts) (int, error)
Delete(ctx context.Context, cids []blobcache.CID) error
Exists(ctx context.Context, cids []blobcache.CID, dst []bool) error
IsVisited(ctx context.Context, cids []blobcache.CID, dst []bool) error
Visit(ctx context.Context, cids []blobcache.CID) error
MaxSize() int
Hash(salt *blobcache.CID, data []byte) blobcache.CID
// Link creates adds a handle to prove access to a volume.
Link(ctx context.Context, target blobcache.OID, rights blobcache.ActionSet, targetVol Volume) error
// Unlink removes a link from the volume.
Unlink(ctx context.Context, targets []blobcache.OID) error
// VisitLinks visits a link to another volume.
// This is only usable in a GC transaction.
VisitLinks(ctx context.Context, targets []blobcache.OID) error
}
Tx is a consistent view of a volume, during a transaction.
type UnsaltedStore ¶
type UnsaltedStore struct {
// contains filtered or unexported fields
}
This is an adapter to a store, since we added salts to the API.
func NewUnsaltedStore ¶
func NewUnsaltedStore(inner Tx) *UnsaltedStore
func ViewUnsalted ¶
func (UnsaltedStore) MaxSize ¶
func (v UnsaltedStore) MaxSize() int
type Volume ¶
type Volume interface {
// GetParams returns the effective parameters of the volume.
GetParams() blobcache.VolumeConfig
// GetBackend returns the backend of the volume.
GetBackend() blobcache.VolumeBackend[blobcache.OID]
BeginTx(ctx context.Context, spec blobcache.TxParams) (Tx, error)
// AccessSubVolume returns the rights granted to access a subvolume.
// Returns 0 if there is no link to the target.
AccessSubVolume(ctx context.Context, target blobcache.OID) (blobcache.ActionSet, error)
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package gitvol implements a Volume in terms of Git
|
Package gitvol implements a Volume in terms of Git |
Click to show internal directories.
Click to hide internal directories.