exchange

package
Version: v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2015 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 Interface

type Interface interface {
	// GetBlock returns the block associated with a given key.
	GetBlock(context.Context, key.Key) (*blocks.Block, error)

	GetBlocks(context.Context, []key.Key) (<-chan *blocks.Block, error)

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

	io.Closer
}

Any type that implements exchange.Interface may be used as an IPFS block exchange protocol.

Source Files

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.
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
t or T : Toggle theme light dark auto
y or Y : Canonical URL