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 ¶
func (*Bitswap) PeerConnected ¶
func (*Bitswap) PeerDisconnected ¶
func (*Bitswap) ReceiveError ¶
func (*Bitswap) ReceiveMessage ¶
func (*Bitswap) WantlistForPeer ¶
type Option ¶
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 EngineTaskWorkerCount ¶
func ProvideEnabled ¶
func ProviderSearchDelay ¶
func RebroadcastDelay ¶
func SetSendDontHaves ¶
func TaskWorkerCount ¶
func WithPeerBlockRequestFilter ¶
func WithPeerBlockRequestFilter(pbrf server.PeerBlockRequestFilter) Option
func WithScoreLedger ¶
func WithScoreLedger(scoreLedger server.ScoreLedger) Option
func WithTargetMessageSize ¶
func WithTaskComparator ¶
func WithTaskComparator(comparator server.TaskComparator) Option
func WithTracer ¶
type PeerBlockRequestFilter ¶
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.