Documentation ¶
Index ¶
- type WantManager
- func (wm *WantManager) CancelWants(ctx context.Context, ks []cid.Cid, peers []peer.ID, ses uint64)
- func (wm *WantManager) Connected(p peer.ID)
- func (wm *WantManager) ConnectedPeers() []peer.ID
- func (wm *WantManager) CurrentWants() []*wantlist.Entry
- func (wm *WantManager) Disconnected(p peer.ID)
- func (wm *WantManager) IsWanted(c cid.Cid) bool
- func (wm *WantManager) Run()
- func (wm *WantManager) SendBlocks(ctx context.Context, env *engine.Envelope)
- func (wm *WantManager) WantBlocks(ctx context.Context, ks []cid.Cid, peers []peer.ID, ses uint64)
- func (wm *WantManager) WantCount() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WantManager ¶
type WantManager struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, network bsnet.BitSwapNetwork) *WantManager
func (*WantManager) CancelWants ¶
CancelWants removes the given cids from the wantlist, tracked by the given session
func (*WantManager) Connected ¶
func (wm *WantManager) Connected(p peer.ID)
func (*WantManager) ConnectedPeers ¶
func (wm *WantManager) ConnectedPeers() []peer.ID
func (*WantManager) CurrentWants ¶
func (wm *WantManager) CurrentWants() []*wantlist.Entry
func (*WantManager) Disconnected ¶
func (wm *WantManager) Disconnected(p peer.ID)
func (*WantManager) SendBlocks ¶
func (wm *WantManager) SendBlocks(ctx context.Context, env *engine.Envelope)
func (*WantManager) WantBlocks ¶
WantBlocks adds the given cids to the wantlist, tracked by the given session
func (*WantManager) WantCount ¶
func (wm *WantManager) WantCount() int
Click to show internal directories.
Click to hide internal directories.