routing

package
v0.0.0-...-bebc87d Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2014 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IpfsRouting

type IpfsRouting interface {
	FindProvidersAsync(context.Context, u.Key, int) <-chan *peer.Peer

	// PutValue adds value corresponding to given Key.
	PutValue(context.Context, u.Key, []byte) error

	// GetValue searches for the value corresponding to given Key.
	GetValue(context.Context, u.Key) ([]byte, error)

	// Announce that this node can provide value for given key
	Provide(context.Context, u.Key) error

	// FindProviders searches for peers who can provide the value for given key.
	FindProviders(context.Context, u.Key) ([]*peer.Peer, error)

	// FindPeer searches for a peer with given ID.
	FindPeer(context.Context, peer.ID) (*peer.Peer, error)
}

IpfsRouting is the routing module interface It is implemented by things like DHTs, etc.

Directories

Path Synopsis
Package dht is a generated protocol buffer package.
Package dht is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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