bchttp

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2026 License: GPL-3.0 Imports: 11 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package bchttp implements a Blobcache service over HTTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbortReq

type AbortReq struct{}

type AbortResp

type AbortResp struct{}

type BeginTxReq

type BeginTxReq struct {
	Volume blobcache.Handle   `json:"volume"`
	Params blobcache.TxParams `json:"params"`
}

type BeginTxResp

type BeginTxResp struct {
	Tx blobcache.Handle `json:"handle"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(hc *http.Client, ep string) *Client

func (*Client) Abort

func (c *Client) Abort(ctx context.Context, tx blobcache.Handle) error

func (*Client) BeginTx

func (c *Client) BeginTx(ctx context.Context, vol blobcache.Handle, txp blobcache.TxParams) (*blobcache.Handle, error)

func (*Client) Commit

func (c *Client) Commit(ctx context.Context, tx blobcache.Handle) error

func (*Client) Copy

func (c *Client) Copy(ctx context.Context, tx blobcache.Handle, srcs []blobcache.Handle, cids []blobcache.CID, out *blobcache.BitMap) error

func (*Client) CreateQueue

func (c *Client) CreateQueue(ctx context.Context, host *blobcache.Endpoint, qspec blobcache.QueueSpec) (*blobcache.Handle, error)

func (*Client) CreateVolume

func (c *Client) CreateVolume(ctx context.Context, host *blobcache.Endpoint, vspec blobcache.VolumeSpec) (*blobcache.Handle, error)

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, tx blobcache.Handle, cids []blobcache.CID) error

func (*Client) Dequeue added in v0.4.0

func (c *Client) Dequeue(ctx context.Context, q blobcache.Handle, buf []blobcache.Message, opts blobcache.DequeueOpts) (int, error)

func (*Client) Drop

func (c *Client) Drop(ctx context.Context, h blobcache.Handle) error

func (*Client) Endpoint

func (c *Client) Endpoint(ctx context.Context) (blobcache.Endpoint, error)

func (*Client) Enqueue added in v0.4.0

func (*Client) Exists

func (c *Client) Exists(ctx context.Context, tx blobcache.Handle, cids []blobcache.CID, dst *blobcache.BitMap) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, tx blobcache.Handle, cid blobcache.CID, buf []byte, opts blobcache.GetOpts) (int, error)

func (*Client) Inspect added in v0.6.0

func (c *Client) Inspect(ctx context.Context, h blobcache.Handle) (blobcache.Info, error)

func (*Client) InspectHandle

func (c *Client) InspectHandle(ctx context.Context, h blobcache.Handle) (*blobcache.HandleInfo, error)

func (*Client) InspectQueue added in v0.4.0

func (c *Client) InspectQueue(ctx context.Context, q blobcache.Handle) (blobcache.QueueInfo, error)

func (*Client) InspectTx

func (c *Client) InspectTx(ctx context.Context, tx blobcache.Handle) (*blobcache.TxInfo, error)

func (*Client) InspectVolume

func (c *Client) InspectVolume(ctx context.Context, h blobcache.Handle) (*blobcache.VolumeInfo, error)

func (*Client) IsVisited

func (c *Client) IsVisited(ctx context.Context, tx blobcache.Handle, cids []blobcache.CID, out *blobcache.BitMap) error

func (*Client) KeepAlive

func (c *Client) KeepAlive(ctx context.Context, hs []blobcache.Handle) error

func (*Client) Load

func (c *Client) Load(ctx context.Context, tx blobcache.Handle, dst *[]byte) error

func (*Client) OpenFiat

func (c *Client) OpenFiat(ctx context.Context, target blobcache.OID, mask blobcache.ActionSet) (*blobcache.Handle, error)

func (*Client) OpenFrom

func (*Client) Post

func (c *Client) Post(ctx context.Context, tx blobcache.Handle, data []byte, opts blobcache.PostOpts) (blobcache.CID, error)

func (*Client) Save

func (c *Client) Save(ctx context.Context, tx blobcache.Handle, root []byte) error

func (*Client) ShareIn added in v0.6.0

func (*Client) ShareOut added in v0.6.0

func (*Client) SubToVolume

func (c *Client) SubToVolume(ctx context.Context, q blobcache.Handle, vol blobcache.Handle, spec blobcache.VolSubSpec) error
func (c *Client) Unlink(ctx context.Context, tx blobcache.Handle, targets []blobcache.LinkID) error

func (*Client) Visit

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.LinkID) error

type CommitReq

type CommitReq struct{}

type CommitResp

type CommitResp struct{}

type CopyReq added in v0.8.0

type CopyReq struct {
	CIDs []blobcache.CID    `json:"cids"`
	Srcs []blobcache.Handle `json:"srcs"`
}

type CopyResp added in v0.8.0

type CopyResp struct {
	Added []bool `json:"added"`
}

type CreateQueueReq

type CreateQueueReq struct {
	Host *blobcache.Endpoint `json:"host,omitempty"`
	Spec blobcache.QueueSpec `json:"spec"`
}

type CreateQueueResp

type CreateQueueResp struct {
	Handle blobcache.Handle `json:"handle"`
}

type CreateVolumeReq

type CreateVolumeReq struct {
	Host *blobcache.Endpoint  `json:"host,omitempty"`
	Spec blobcache.VolumeSpec `json:"spec"`
}

type CreateVolumeResp

type CreateVolumeResp struct {
	Handle blobcache.Handle `json:"handle"`
}

type DeleteReq

type DeleteReq struct {
	CIDs []blobcache.CID `json:"cids"`
}

type DeleteResp

type DeleteResp struct{}

type DropReq

type DropReq struct {
	Handle blobcache.Handle `json:"handle"`
}

type DropResp

type DropResp struct{}

type EndpointReq

type EndpointReq struct{}

type EndpointResp

type EndpointResp struct {
	Endpoint blobcache.Endpoint `json:"endpoint"`
}

type ExistsReq

type ExistsReq struct {
	CIDs []blobcache.CID `json:"cids"`
}

type ExistsResp

type ExistsResp struct {
	Exists []bool `json:"exists"`
}

type GetReq

type GetReq struct {
	CID  blobcache.CID  `json:"cid"`
	Salt *blobcache.CID `json:"salt,omitempty"`
}

type InsertReq

type InsertReq struct {
	Messages []blobcache.Message `json:"messages"`
}

type InspectHandleReq

type InspectHandleReq struct {
	Handle blobcache.Handle `json:"handle"`
}

Handle messages.

type InspectHandleResp

type InspectHandleResp struct {
	Info blobcache.HandleInfo `json:"info"`
}

type InspectQueueReq added in v0.4.0

type InspectQueueReq struct {
	Queue blobcache.Handle `json:"queue"`
}

type InspectQueueResp added in v0.4.0

type InspectQueueResp struct {
	Info blobcache.QueueInfo `json:"info"`
}

type InspectReq added in v0.6.0

type InspectReq struct {
	Handle blobcache.Handle `json:"handle"`
}

type InspectResp added in v0.6.0

type InspectResp struct {
	Info blobcache.Info `json:"info"`
}

type InspectTxReq

type InspectTxReq struct {
	Tx blobcache.Handle `json:"tx"`
}

type InspectTxResp

type InspectTxResp struct {
	Info blobcache.TxInfo `json:"info"`
}

type InspectVolumeReq

type InspectVolumeReq struct {
	Volume blobcache.Handle `json:"volume"`
}

type IsVisitedReq

type IsVisitedReq struct {
	CIDs []blobcache.CID `json:"cids"`
}

type IsVisitedResp

type IsVisitedResp struct {
	Visited []bool `json:"visited"`
}

type KeepAliveReq

type KeepAliveReq struct {
	Handles []blobcache.Handle `json:"handles"`
}

type KeepAliveResp

type KeepAliveResp struct{}

type LinkReq

type LinkReq struct {
	Target blobcache.Handle    `json:"target"`
	Mask   blobcache.ActionSet `json:"mask"`
}

type LinkResp

type LinkResp struct {
	Token blobcache.LinkToken `json:"token"`
}

type LoadReq

type LoadReq struct{}

type LoadResp

type LoadResp struct {
	Root []byte `json:"root"`
}

type NextReq

type NextReq struct {
	Opts blobcache.DequeueOpts `json:"opts"`
	Max  int                   `json:"max"`
}

type NextResp

type NextResp struct {
	Messages []blobcache.Message `json:"messages"`
}

type OpenFiatReq

type OpenFiatReq struct {
	Target blobcache.OID       `json:"target"`
	Mask   blobcache.ActionSet `json:"mask"`
}

type OpenFiatResp

type OpenFiatResp struct {
	Handle blobcache.Handle     `json:"handle"`
	Info   blobcache.VolumeInfo `json:"info"`
}

type OpenFromReq

type OpenFromReq struct {
	Base  blobcache.Handle    `json:"base"`
	Token blobcache.LinkToken `json:"token"`
	Mask  blobcache.ActionSet `json:"mask"`
}

type OpenFromResp

type OpenFromResp struct {
	Handle blobcache.Handle     `json:"handle"`
	Info   blobcache.VolumeInfo `json:"info"`
}

type SaveReq

type SaveReq struct {
	Root []byte `json:"root"`
}

type SaveResp

type SaveResp struct{}

type Server

type Server struct {
	Service blobcache.Service
}

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ShareInReq added in v0.6.0

type ShareInReq struct {
	Host   blobcache.NodeID `json:"host"`
	Handle blobcache.Handle `json:"handle"`
}

type ShareInResp added in v0.6.0

type ShareInResp struct {
	Handle blobcache.Handle `json:"handle"`
}

type ShareOutReq added in v0.6.0

type ShareOutReq struct {
	Handle blobcache.Handle    `json:"handle"`
	Peer   blobcache.NodeID    `json:"peer"`
	Mask   blobcache.ActionSet `json:"mask"`
}

type ShareOutResp added in v0.6.0

type ShareOutResp struct {
	Handle blobcache.Handle `json:"handle"`
}

type SubToVolumeReq

type SubToVolumeReq struct {
	Volume blobcache.Handle     `json:"volume"`
	Spec   blobcache.VolSubSpec `json:"spec"`
}

type SubToVolumeResp

type SubToVolumeResp struct{}

type UnlinkReq

type UnlinkReq struct {
	Targets []blobcache.LinkID `json:"targets"`
}

type UnlinkResp

type UnlinkResp struct{}

type VisitLinksReq

type VisitLinksReq struct {
	Targets []blobcache.LinkID `json:"targets"`
}

type VisitLinksResp

type VisitLinksResp struct{}

type VisitReq

type VisitReq struct {
	CIDs []blobcache.CID `json:"cids"`
}

type VisitResp

type VisitResp struct{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL