Documentation
¶
Overview ¶
Package bclocal implements a local Blobcache service.
Index ¶
- Constants
- func SetupDB(ctx context.Context, db *sqlx.DB) error
- type ACL
- type Env
- type ErrNotAllowed
- type PeerView
- func (pv *PeerView) CreateVolume(ctx context.Context, spec blobcache.VolumeSpec) (*blobcache.Handle, error)
- func (pv *PeerView) DeleteEntry(ctx context.Context, namespace blobcache.Handle, name string) error
- func (pv *PeerView) GetEntry(ctx context.Context, namespace blobcache.Handle, name string) (*blobcache.Entry, error)
- func (pv *PeerView) ListNames(ctx context.Context, namespace blobcache.Handle) ([]string, error)
- func (pv *PeerView) Open(ctx context.Context, x blobcache.OID) (*blobcache.Handle, error)
- func (pv *PeerView) OpenAt(ctx context.Context, namespace blobcache.Handle, name string) (*blobcache.Handle, error)
- func (pv *PeerView) PutEntry(ctx context.Context, namespace blobcache.Handle, name string, ...) error
- type Service
- func (s *Service) Abort(ctx context.Context, txh blobcache.Handle) error
- func (s *Service) Access(peer blobcache.PeerID) blobcache.Service
- func (s *Service) Await(ctx context.Context, cond blobcache.Conditions) error
- func (s *Service) BeginTx(ctx context.Context, volh blobcache.Handle, txspec blobcache.TxParams) (*blobcache.Handle, error)
- func (s *Service) Commit(ctx context.Context, txh blobcache.Handle, root []byte) error
- func (s *Service) CreateVolume(ctx context.Context, vspec blobcache.VolumeSpec) (*blobcache.Handle, error)
- func (s *Service) Delete(ctx context.Context, txh blobcache.Handle, cid blobcache.CID) error
- func (s *Service) DeleteEntry(ctx context.Context, ns blobcache.Handle, name string) error
- func (s *Service) Drop(ctx context.Context, h blobcache.Handle) error
- func (s *Service) Endpoint(_ context.Context) (blobcache.Endpoint, error)
- func (s *Service) Exists(ctx context.Context, txh blobcache.Handle, cid blobcache.CID) (bool, error)
- func (s *Service) Get(ctx context.Context, txh blobcache.Handle, cid blobcache.CID, ...) (int, error)
- func (s *Service) GetEntry(ctx context.Context, ns blobcache.Handle, name string) (*blobcache.Entry, error)
- func (s *Service) InspectHandle(ctx context.Context, h blobcache.Handle) (*blobcache.HandleInfo, error)
- func (s *Service) InspectVolume(ctx context.Context, h blobcache.Handle) (*blobcache.VolumeInfo, error)
- func (s *Service) KeepAlive(ctx context.Context, hs []blobcache.Handle) error
- func (s *Service) ListNames(ctx context.Context, ns blobcache.Handle) ([]string, error)
- func (s *Service) Load(ctx context.Context, txh blobcache.Handle, dst *[]byte) error
- func (s *Service) Open(ctx context.Context, x blobcache.OID) (*blobcache.Handle, error)
- func (s *Service) OpenAt(ctx context.Context, base blobcache.Handle, name string) (*blobcache.Handle, error)
- func (s *Service) Post(ctx context.Context, txh blobcache.Handle, salt *blobcache.CID, data []byte) (blobcache.CID, error)
- func (s *Service) PutEntry(ctx context.Context, ns blobcache.Handle, name string, target blobcache.Handle) error
- func (s *Service) Run(ctx context.Context) error
- type StoreID
Constants ¶
View Source
const ( DefaultVolumeTTL = 5 * time.Minute DefaultTxTTL = 1 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Env ¶
type Env struct { DB *sqlx.DB PrivateKey ed25519.PrivateKey PacketConn net.PacketConn ACL ACL }
type ErrNotAllowed ¶
func (ErrNotAllowed) Error ¶
func (e ErrNotAllowed) Error() string
type PeerView ¶
func (*PeerView) CreateVolume ¶
func (*PeerView) DeleteEntry ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements a blobcache.Service.
func NewTestService ¶
NewTestService creates a service scoped to the life of the test.
func (*Service) CreateVolume ¶
func (*Service) DeleteEntry ¶
func (*Service) InspectHandle ¶
func (*Service) InspectVolume ¶
Click to show internal directories.
Click to hide internal directories.