Documentation
¶
Overview ¶
bcnet implements the Blobcache Protocol (BCP).
Index ¶
- type Message
- type Node
- func (n *Node) Ask(ctx context.Context, remote blobcache.Endpoint, req Message, resp *Message) error
- func (n *Node) LocalAddr() netip.AddrPort
- func (n *Node) LocalEndpoint() blobcache.Endpoint
- func (n *Node) LocalID() blobcache.PeerID
- func (n *Node) Serve(ctx context.Context, srv bcp.Handler) error
- func (n *Node) Tell(ctx context.Context, remote blobcache.Endpoint, req bcp.Message) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func New ¶
func New(privateKey ed25519.PrivateKey, pc net.PacketConn) *Node
func (*Node) Ask ¶
func (n *Node) Ask(ctx context.Context, remote blobcache.Endpoint, req Message, resp *Message) error
Ask opens a bidirectional stream to the given peer and sends the given request, then waits for a response.
func (*Node) LocalEndpoint ¶
Click to show internal directories.
Click to hide internal directories.