Documentation ¶
Index ¶
- Constants
- func Hash(x []byte) cadata.ID
- func NewBlobSet(c *BlobMainClient, peer PeerID) cadata.Set
- func Serve(ctx context.Context, asker p2p.AskServer[PeerID], h AskHandler) error
- type AskHandler
- type BlobMainClient
- func (c *BlobMainClient) Add(ctx context.Context, dst PeerID, ids []cadata.ID) ([]bool, error)
- func (c *BlobMainClient) Delete(ctx context.Context, dst PeerID, ids []cadata.ID) ([]bool, error)
- func (c *BlobMainClient) Exists(ctx context.Context, dst PeerID, ids []cadata.ID) ([]bool, error)
- func (c *BlobMainClient) List(ctx context.Context, dst PeerID, span cadata.Span, ids []cadata.ID) (int, error)
- type BlobMainServer
- type BlobPullClient
- type BlobPullServer
- type BlobReq
- type BlobRes
- type ListBlobReq
- type ListBlobRes
- type NodeInfo
- type Params
- type PeerID
- type Service
- type TreeClient
- type TreeID
- type TreeInfo
- type TreePostReq
- type TreeReq
- type TreeResp
- type TreeServer
- type TreeService
- type TreeStatus
- type WireError
Constants ¶
View Source
const ( StatusOK = TreeStatus("OK") StatusDEGRADED = TreeStatus("DEGRADED") StatusINVALID = TreeStatus("INVALID") )
View Source
const MaxMessageSize = 1 << 22
Variables ¶
This section is empty.
Functions ¶
func NewBlobSet ¶
func NewBlobSet(c *BlobMainClient, peer PeerID) cadata.Set
Types ¶
type AskHandler ¶
type BlobMainClient ¶
type BlobMainClient struct {
// contains filtered or unexported fields
}
type BlobMainServer ¶
type BlobMainServer struct {
// contains filtered or unexported fields
}
type BlobPullClient ¶
type BlobPullClient struct {
// contains filtered or unexported fields
}
type BlobPullServer ¶
type BlobPullServer struct {
// contains filtered or unexported fields
}
type BlobRes ¶
type BlobRes struct { Error *WireError `json:"error,omitempty"` Add []bool `json:"add,omitempty"` Delete []bool `json:"delete,omitempty"` Exists []bool `json:"exists,omitempty"` List *ListBlobRes `json:"list,omitempty"` }
type ListBlobReq ¶
type ListBlobRes ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (Service) BlobMain ¶
func (s Service) BlobMain() *BlobMainClient
func (Service) BlobPull ¶
func (s Service) BlobPull() *BlobPullClient
func (Service) Trees ¶
func (s Service) Trees() *TreeClient
type TreeClient ¶
type TreeClient struct {
// contains filtered or unexported fields
}
type TreePostReq ¶
type TreeReq ¶
type TreeReq struct { Post *TreePostReq `json:"post,omitempty"` Drop *TreeID `json:"delete,omitempty"` List *struct{} `json:"list,omitempty"` GetNodeInfo *struct{} `json:"get_node_info,omitempty"` }
type TreeServer ¶
type TreeServer struct {
// contains filtered or unexported fields
}
type TreeService ¶
type TreeStatus ¶
type TreeStatus string
Click to show internal directories.
Click to hide internal directories.