Documentation
¶
Overview ¶
Package bcipc implements the Blobcache Protocol over UNIX sockets
Index ¶
- Constants
- func Listen(p string) (*net.UnixListener, error)
- func ListenAndServe(ctx context.Context, p string, srv bcp.Handler) error
- func Serve(ctx context.Context, lis *net.UnixListener, srv bcp.Handler) error
- type Client
- func (c *Client) Abort(ctx context.Context, tx blobcache.Handle) error
- func (c *Client) BeginTx(ctx context.Context, volh blobcache.Handle, txp blobcache.TxParams) (*blobcache.Handle, error)
- func (c *Client) CloneVolume(ctx context.Context, caller *blobcache.PeerID, volh blobcache.Handle) (*blobcache.Handle, error)
- func (c *Client) Close() error
- func (c *Client) Commit(ctx context.Context, tx blobcache.Handle) error
- func (c *Client) Copy(ctx context.Context, tx blobcache.Handle, srcTxns []blobcache.Handle, ...) error
- func (c *Client) CreateQueue(ctx context.Context, _ *blobcache.Endpoint, qspec blobcache.QueueSpec) (*blobcache.Handle, error)
- func (c *Client) CreateVolume(ctx context.Context, host *blobcache.Endpoint, vspec blobcache.VolumeSpec) (*blobcache.Handle, error)
- func (c *Client) Delete(ctx context.Context, tx blobcache.Handle, cids []blobcache.CID) error
- func (c *Client) Dequeue(ctx context.Context, qh blobcache.Handle, buf []blobcache.Message, ...) (int, error)
- func (c *Client) Drop(ctx context.Context, h blobcache.Handle) error
- func (c *Client) Endpoint(ctx context.Context) (blobcache.Endpoint, error)
- func (c *Client) Enqueue(ctx context.Context, qh blobcache.Handle, msgs []blobcache.Message) (*blobcache.InsertResp, error)
- func (c *Client) Exists(ctx context.Context, tx blobcache.Handle, cids []blobcache.CID, dst []bool) error
- func (c *Client) Get(ctx context.Context, tx blobcache.Handle, cid blobcache.CID, buf []byte, ...) (int, error)
- func (c *Client) InspectHandle(ctx context.Context, h blobcache.Handle) (*blobcache.HandleInfo, error)
- func (c *Client) InspectQueue(ctx context.Context, qh blobcache.Handle) (blobcache.QueueInfo, error)
- func (c *Client) InspectTx(ctx context.Context, tx blobcache.Handle) (*blobcache.TxInfo, error)
- func (c *Client) InspectVolume(ctx context.Context, h blobcache.Handle) (*blobcache.VolumeInfo, error)
- func (c *Client) IsVisited(ctx context.Context, tx blobcache.Handle, cids []blobcache.CID, dst []bool) error
- func (c *Client) KeepAlive(ctx context.Context, hs []blobcache.Handle) error
- func (c *Client) Link(ctx context.Context, tx blobcache.Handle, subvol blobcache.Handle, ...) (*blobcache.LinkToken, error)
- func (c *Client) Load(ctx context.Context, tx blobcache.Handle, dst *[]byte) error
- func (c *Client) OpenFiat(ctx context.Context, target blobcache.OID, mask blobcache.ActionSet) (*blobcache.Handle, error)
- func (c *Client) OpenFrom(ctx context.Context, base blobcache.Handle, token blobcache.LinkToken, ...) (*blobcache.Handle, error)
- func (c *Client) Post(ctx context.Context, tx blobcache.Handle, data []byte, opts blobcache.PostOpts) (blobcache.CID, error)
- func (c *Client) Save(ctx context.Context, tx blobcache.Handle, src []byte) error
- func (c *Client) Share(ctx context.Context, h blobcache.Handle, to blobcache.PeerID, ...) (*blobcache.Handle, error)
- func (c *Client) SubToVolume(ctx context.Context, qh blobcache.Handle, volh blobcache.Handle, ...) error
- func (c *Client) Unlink(ctx context.Context, tx blobcache.Handle, targets []blobcache.LinkToken) error
- func (c *Client) Visit(ctx context.Context, tx blobcache.Handle, cids []blobcache.CID) error
- func (c *Client) VisitLinks(ctx context.Context, tx blobcache.Handle, targets []blobcache.LinkToken) error
- type Server
Constants ¶
View Source
const MaxMessageLen = 1<<24 + bcp.HeaderLen
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CloneVolume ¶
func (*Client) CreateQueue ¶
func (*Client) CreateVolume ¶
func (c *Client) CreateVolume(ctx context.Context, host *blobcache.Endpoint, vspec blobcache.VolumeSpec) (*blobcache.Handle, error)
CreateVolume creates a new volume.
func (*Client) Exists ¶
func (c *Client) Exists(ctx context.Context, tx blobcache.Handle, cids []blobcache.CID, dst []bool) error
Exists checks if a CID exists in the volume
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, tx blobcache.Handle, cid blobcache.CID, buf []byte, opts blobcache.GetOpts) (int, error)
Get returns the data for a CID.
func (*Client) InspectHandle ¶
func (*Client) InspectQueue ¶
func (*Client) InspectVolume ¶
func (c *Client) InspectVolume(ctx context.Context, h blobcache.Handle) (*blobcache.VolumeInfo, error)
InspectVolume returns info about a Volume.
func (*Client) Link ¶
func (c *Client) Link(ctx context.Context, tx blobcache.Handle, subvol blobcache.Handle, mask blobcache.ActionSet) (*blobcache.LinkToken, error)
Link allows the Volume to reference another volume.
func (*Client) Post ¶
func (c *Client) Post(ctx context.Context, tx blobcache.Handle, data []byte, opts blobcache.PostOpts) (blobcache.CID, error)
Post posts data to the volume
func (*Client) SubToVolume ¶
Click to show internal directories.
Click to hide internal directories.