Documentation
¶
Overview ¶
Package exchange defines the IPFS exchange interface
Index ¶
- type Fetcherdeprecated
- type Interfacedeprecated
- type SessionExchangedeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher
deprecated
type Fetcher interface {
// GetBlock returns the block associated with a given cid.
GetBlock(context.Context, cid.Cid) (blocks.Block, error)
// GetBlocks returns the blocks associated with the given cids.
// If the requested blocks are not found immediately, this function should hang until
// they are found. If they can't be found later, it's also acceptable to terminate.
GetBlocks(context.Context, []cid.Cid) (<-chan blocks.Block, error)
}
Fetcher is an object that can be used to retrieve blocks
Deprecated: use github.com/ipfs/boxo/exchange.Fetcher
type Interface
deprecated
type Interface interface {
Fetcher
// NotifyNewBlocks tells the exchange that new blocks are available and can be served.
NotifyNewBlocks(ctx context.Context, blocks ...blocks.Block) error
io.Closer
}
Interface defines the functionality of the IPFS block exchange protocol.
Deprecated: use github.com/ipfs/boxo/exchange.Interface
type SessionExchange
deprecated
type SessionExchange interface {
Interface
// NewSession generates a new exchange session. You should use this, rather
// that calling GetBlocks, any time you intend to do several related calls
// in a row. The exchange can leverage that to be more efficient.
NewSession(context.Context) Fetcher
}
SessionExchange is an exchange.Interface which supports sessions.
Deprecated: use github.com/ipfs/boxo/exchange.SessionExchange
Click to show internal directories.
Click to hide internal directories.