go-ipfs-exchange-interface: github.com/ipfs/go-ipfs-exchange-interface Index | Files

package exchange

import "github.com/ipfs/go-ipfs-exchange-interface"

Package exchange defines the IPFS exchange interface


Package Files


type Fetcher Uses

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 Uses

type Interface interface {

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

    IsOnline() bool


Interface defines the functionality of the IPFS block exchange protocol.

type SessionExchange Uses

type SessionExchange interface {
    NewSession(context.Context) Fetcher

SessionExchange is an exchange.Interface which supports sessions.

Package exchange imports 4 packages (graph) and is imported by 40 packages. Updated 2020-05-08. Refresh now. Tools for package owners.