wantmanager

package
v0.0.0-...-ce94876 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2019 License: MIT, MIT Imports: 11 Imported by: 0

Documentation

Index

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

func (wm *WantManager) CancelWants(ctx context.Context, ks []cid.Cid, peers []peer.ID, ses uint64)

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) IsWanted

func (wm *WantManager) IsWanted(c cid.Cid) bool

func (*WantManager) Run

func (wm *WantManager) Run()

TODO: use goprocess here once i trust it

func (*WantManager) SendBlocks

func (wm *WantManager) SendBlocks(ctx context.Context, env *engine.Envelope)

func (*WantManager) WantBlocks

func (wm *WantManager) WantBlocks(ctx context.Context, ks []cid.Cid, peers []peer.ID, ses uint64)

WantBlocks adds the given cids to the wantlist, tracked by the given session

func (*WantManager) WantCount

func (wm *WantManager) WantCount() int

Jump to

Keyboard shortcuts

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