Documentation ¶
Index ¶
- Variables
- type Bitswap
- func (bs *Bitswap) Close() error
- func (bs *Bitswap) NotifyNewBlocks(ctx context.Context, blks ...blocks.Block) error
- func (bs *Bitswap) PeerConnected(p peer.ID)
- func (bs *Bitswap) PeerDisconnected(p peer.ID)
- func (bs *Bitswap) ReceiveError(err error)
- func (bs *Bitswap) ReceiveMessage(ctx context.Context, p peer.ID, incoming message.BitSwapMessage)
- func (bs *Bitswap) Stat() (*Stat, error)
- func (bs *Bitswap) WantlistForPeer(p peer.ID) []cid.Cid
- type Option
- func EngineBlockstoreWorkerCount(count int) Option
- func EngineTaskWorkerCount(count int) Option
- func MaxOutstandingBytesPerPeer(count int) Option
- func ProvideEnabled(enabled bool) Option
- func ProviderSearchDelay(newProvSearchDelay time.Duration) Option
- func RebroadcastDelay(newRebroadcastDelay delay.D) Option
- func SetSendDontHaves(send bool) Option
- func SetSimulateDontHavesOnTimeout(send bool) Option
- func TaskWorkerCount(count int) Option
- func WithPeerBlockRequestFilter(pbrf server.PeerBlockRequestFilter) Option
- func WithScoreLedger(scoreLedger server.ScoreLedger) Option
- func WithTargetMessageSize(tms int) Option
- func WithTaskComparator(comparator server.TaskComparator) Option
- func WithTracer(tap tracer.Tracer) Option
- type PeerBlockRequestFilter
- type Stat
- type TaskComparator
- type TaskInfo
- type Tracer
Constants ¶
This section is empty.
Variables ¶
View Source
var HasBlockBufferSize = defaults.HasBlockBufferSize
Functions ¶
This section is empty.
Types ¶
type Bitswap ¶
func New ¶
func New(ctx context.Context, net network.BitSwapNetwork, bstore blockstore.Blockstore, options ...Option) *Bitswap
func (*Bitswap) NotifyNewBlocks ¶ added in v0.8.0
func (*Bitswap) PeerConnected ¶
func (*Bitswap) PeerDisconnected ¶
func (*Bitswap) ReceiveError ¶
func (*Bitswap) ReceiveMessage ¶
func (*Bitswap) WantlistForPeer ¶
type Option ¶ added in v0.0.6
type Option struct {
// contains filtered or unexported fields
}
Option is interface{} of server.Option or client.Option or func(*Bitswap) wrapped in a struct to gain strong type checking.
func EngineBlockstoreWorkerCount ¶ added in v0.3.3
func EngineTaskWorkerCount ¶ added in v0.4.0
func MaxOutstandingBytesPerPeer ¶ added in v0.4.0
func ProvideEnabled ¶ added in v0.0.5
func ProviderSearchDelay ¶ added in v0.1.2
func RebroadcastDelay ¶ added in v0.1.2
func SetSendDontHaves ¶ added in v0.2.0
func SetSimulateDontHavesOnTimeout ¶ added in v0.4.0
func TaskWorkerCount ¶
func WithPeerBlockRequestFilter ¶ added in v0.6.0
func WithPeerBlockRequestFilter(pbrf server.PeerBlockRequestFilter) Option
func WithScoreLedger ¶ added in v0.3.0
func WithScoreLedger(scoreLedger server.ScoreLedger) Option
func WithTargetMessageSize ¶ added in v0.6.0
func WithTaskComparator ¶ added in v0.5.0
func WithTaskComparator(comparator server.TaskComparator) Option
func WithTracer ¶ added in v0.5.0
type PeerBlockRequestFilter ¶ added in v0.6.0
type PeerBlockRequestFilter = server.PeerBlockRequestFilter
DEPRECATED
Directories ¶
Path | Synopsis |
---|---|
Package bitswap implements the IPFS exchange interface with the BitSwap bilateral exchange protocol.
|
Package bitswap implements the IPFS exchange interface with the BitSwap bilateral exchange protocol. |
wantlist
Package wantlist implements an object for bitswap that contains the keys that a given peer wants.
|
Package wantlist implements an object for bitswap that contains the keys that a given peer wants. |
internal/decision
Package decision implements the decision engine for the bitswap service.
|
Package decision implements the decision engine for the bitswap service. |
Click to show internal directories.
Click to hide internal directories.