Versions in this module Expand all Collapse all v0 v0.0.2 Dec 15, 2025 Changes in this version type Env + MkSchema schema.Factory v0.0.1 Nov 25, 2025 Changes in this version + const DefaultTxTTL + const DefaultVolumeTTL + const MaxMaxBlobSize + func AddDefaultSchema(name blobcache.SchemaName, constructor schema.Constructor) + func DefaultRoot() blobcache.VolumeSpec + func DefaultSchemas() map[blobcache.SchemaName]schema.Constructor + type AllOrNothingPolicy struct + Allow []blobcache.PeerID + func (p *AllOrNothingPolicy) CanConnect(peer blobcache.PeerID) bool + func (p *AllOrNothingPolicy) CanCreate(peer blobcache.PeerID) bool + func (p *AllOrNothingPolicy) OpenFiat(peer blobcache.PeerID, target blobcache.OID) blobcache.ActionSet + type Config struct + NoSync bool + type Env struct + Background context.Context + Policy Policy + PrivateKey ed25519.PrivateKey + Root blobcache.VolumeSpec + Schemas map[blobcache.SchemaName]schema.Constructor + StateDir string + func NewTestEnv(t testing.TB) Env + type ErrNotAllowed struct + Action string + Peer blobcache.PeerID + Target blobcache.OID + func (e ErrNotAllowed) Error() string + type Policy interface + CanConnect func(peer blobcache.PeerID) bool + CanCreate func(peer blobcache.PeerID) bool + OpenFiat func(peer blobcache.PeerID, target blobcache.OID) blobcache.ActionSet + type Service struct + func New(env Env, cfg Config) (*Service, error) + func NewTestService(t testing.TB) *Service + func NewTestServiceFromEnv(t testing.TB, env Env) *Service + func (s *Service) Abort(ctx context.Context, txh blobcache.Handle) error + func (s *Service) AbortAll(ctx context.Context) error + func (s *Service) BeginTx(ctx context.Context, volh blobcache.Handle, txspec blobcache.TxParams) (*blobcache.Handle, error) + func (s *Service) Cleanup(ctx context.Context) error + func (s *Service) CloneVolume(ctx context.Context, caller *blobcache.PeerID, volh blobcache.Handle) (*blobcache.Handle, error) + func (s *Service) Close() error + func (s *Service) Commit(ctx context.Context, txh blobcache.Handle) error + func (s *Service) Copy(ctx context.Context, txh blobcache.Handle, srcTxns []blobcache.Handle, ...) error + func (s *Service) CreateQueue(ctx context.Context, host *blobcache.Endpoint, qspec blobcache.QueueSpec) (*blobcache.Handle, error) + func (s *Service) CreateVolume(ctx context.Context, host *blobcache.Endpoint, vspec blobcache.VolumeSpec) (*blobcache.Handle, error) + func (s *Service) Delete(ctx context.Context, txh blobcache.Handle, cids []blobcache.CID) error + func (s *Service) Drop(ctx context.Context, h blobcache.Handle) error + func (s *Service) Endpoint(ctx context.Context) (blobcache.Endpoint, error) + func (s *Service) Exists(ctx context.Context, txh blobcache.Handle, cids []blobcache.CID, dst []bool) error + func (s *Service) Get(ctx context.Context, txh blobcache.Handle, cid blobcache.CID, buf []byte, ...) (int, error) + func (s *Service) Insert(ctx context.Context, from *blobcache.Endpoint, qh blobcache.Handle, ...) (*blobcache.InsertResp, error) + func (s *Service) InspectHandle(ctx context.Context, h blobcache.Handle) (*blobcache.HandleInfo, error) + func (s *Service) InspectTx(ctx context.Context, txh blobcache.Handle) (*blobcache.TxInfo, error) + func (s *Service) InspectVolume(ctx context.Context, h blobcache.Handle) (*blobcache.VolumeInfo, error) + func (s *Service) IsVisited(ctx context.Context, txh blobcache.Handle, cids []blobcache.CID, dst []bool) error + func (s *Service) KeepAlive(ctx context.Context, hs []blobcache.Handle) error + func (s *Service) Link(ctx context.Context, txh blobcache.Handle, target blobcache.Handle, ...) error + func (s *Service) Load(ctx context.Context, txh blobcache.Handle, dst *[]byte) error + func (s *Service) LocalID() blobcache.PeerID + func (s *Service) Next(ctx context.Context, qh blobcache.Handle, buf []blobcache.Message, ...) (int, error) + func (s *Service) OpenFiat(ctx context.Context, x blobcache.OID, mask blobcache.ActionSet) (*blobcache.Handle, error) + func (s *Service) OpenFrom(ctx context.Context, base blobcache.Handle, x blobcache.OID, ...) (*blobcache.Handle, error) + func (s *Service) Ping(ctx context.Context, ep blobcache.Endpoint) error + func (s *Service) Post(ctx context.Context, txh blobcache.Handle, data []byte, ...) (blobcache.CID, error) + func (s *Service) Save(ctx context.Context, txh blobcache.Handle, root []byte) error + func (s *Service) Serve(ctx context.Context, pc net.PacketConn) error + func (s *Service) Share(ctx context.Context, h blobcache.Handle, to blobcache.PeerID, ...) (*blobcache.Handle, error) + func (s *Service) SubToVolume(ctx context.Context, qh blobcache.Handle, volh blobcache.Handle) error + func (s *Service) Unlink(ctx context.Context, txh blobcache.Handle, targets []blobcache.OID) error + func (s *Service) Visit(ctx context.Context, txh blobcache.Handle, cids []blobcache.CID) error + func (s *Service) VisitLinks(ctx context.Context, txh blobcache.Handle, targets []blobcache.OID) error