Documentation
¶
Index ¶
- func OpenHandle(secret *[32]byte, peerID PeerID, x Handle) (data [16]byte, _ error)
- func ServeAsks(ctx context.Context, asker p2p.AskServer[inet256.ID], h AskHandler) error
- type AskHandler
- type BlobPullClient
- type BlobPullReq
- type BlobPullServer
- type DAGClient
- func (dc *DAGClient) Get(ctx context.Context, dst PeerID, scheme string, refs []owldag.Ref) (*DAGInfo, error)
- func (dc *DAGClient) GetHeads(ctx context.Context, dst PeerID, h Handle) ([]owldag.Head, error)
- func (dc *DAGClient) List(ctx context.Context, dst PeerID, scheme string, refs []owldag.Ref) ([]DAGInfo, error)
- func (dc *DAGClient) PushHeads(ctx context.Context, dst PeerID, srcDAG uint32, h Handle, heads []owldag.Head) error
- type DAGInfo
- type DAGReq
- type DAGRes
- type DAGServer
- type GetHeadsReq
- type GetListReq
- type Handle
- type LocalDAGInfo
- type Node
- type PeerID
- type PushHeadsReq
- type Store
- type Swarm
- type WireError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenHandle ¶
OpenHandle returns the data from the handle or an error if the handle is invalid
Types ¶
type AskHandler ¶
type BlobPullClient ¶
type BlobPullClient struct {
// contains filtered or unexported fields
}
type BlobPullReq ¶
type BlobPullServer ¶
type DAGClient ¶
type DAGClient struct {
// contains filtered or unexported fields
}
type DAGReq ¶
type DAGReq struct { GetHeads *GetHeadsReq `json:"get_heads,omitempty"` PushHeads *PushHeadsReq `json:"push_heads,omitempty"` GetList *GetListReq `json:"list,omitempty"` }
type DAGServer ¶
type DAGServer struct { OnPushHeads func(from PeerID, volID int, srcDAG Handle, heads []owldag.Head) error OnGetHeads func(from PeerID, volID int) ([]owldag.Head, error) OnList func(from PeerID, schemeIs string, mustContain []owldag.Ref) ([]LocalDAGInfo, error) // contains filtered or unexported fields }
type GetHeadsReq ¶
type GetHeadsReq struct {
DAG Handle `json:"dag"`
}
type GetListReq ¶
type Handle ¶
type Handle [32]byte
Handle is a reference to a resource on a node
func (Handle) MarhsalJSON ¶
func (*Handle) UnmarhsalJSON ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) BlobPullClient ¶
func (n *Node) BlobPullClient() BlobPullClient
func (*Node) BlobPullServer ¶
func (n *Node) BlobPullServer(ctx context.Context, srv *BlobPullServer) error
type PushHeadsReq ¶
Click to show internal directories.
Click to hide internal directories.