discovery

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2019 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Local

type Local struct {
	// contains filtered or unexported fields
}

func NewLocal

func NewLocal(ds dtypes.MetadataDS) *Local

func (*Local) AddPeer

func (l *Local) AddPeer(cid cid.Cid, peer RetrievalPeer) error

func (*Local) GetPeers

func (l *Local) GetPeers(data cid.Cid) ([]RetrievalPeer, error)

type PeerResolver

type PeerResolver interface {
	GetPeers(data cid.Cid) ([]RetrievalPeer, error) // TODO: channel
}

func Multi

func Multi(r PeerResolver) PeerResolver

type RetrievalPeer

type RetrievalPeer struct {
	Address address.Address
	ID      peer.ID // optional
}

Jump to

Keyboard shortcuts

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