exchange

package
v0.4.14-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package exchange defines the IPFS exchange interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetcher added in v0.4.11

type Fetcher interface {
	// GetBlock returns the block associated with a given key.
	GetBlock(context.Context, *cid.Cid) (blocks.Block, error)
	GetBlocks(context.Context, []*cid.Cid) (<-chan blocks.Block, error)
}

Fetcher is an object that can be used to retrieve blocks

type Interface

type Interface interface {
	Fetcher

	// TODO Should callers be concerned with whether the block was made
	// available on the network?
	HasBlock(blocks.Block) error

	IsOnline() bool

	io.Closer
}

Interface defines the functionality of the IPFS block exchange protocol.

type SessionExchange

type SessionExchange interface {
	Interface
	NewSession(context.Context) Interface
}

SessionExchange is an exchange.Interface which supports sessions.

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.
decision
package decision implements the decision engine for the bitswap service.
package decision implements the decision engine for the bitswap service.
message/pb
Package bitswap_message_pb is a generated protocol buffer package.
Package bitswap_message_pb is a generated protocol buffer package.
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.
package offline implements an object that implements the exchange interface but returns nil values to every request.
package offline implements an object that implements the exchange interface but returns nil values to every request.

Jump to

Keyboard shortcuts

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