discovery

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discoverer

type Discoverer interface {
	Lookup(
		ctx context.Context,
		opts ...peer.LookupOption,
	) (<-chan *peer.Peer, error)
}

Discoverer defines the interface for a addressBook provider, eg our DHT

type PeerStorer added in v0.5.0

type PeerStorer interface {
	Add(*peer.Peer, bool)
	AddDiscoverer(Discoverer) error
	Lookup(
		context.Context,
		...peer.LookupOption,
	) (<-chan *peer.Peer, error)
}

PeerStorer interface

func NewPeerStorer added in v0.5.0

func NewPeerStorer(store *sqlobjectstore.Store) PeerStorer

NewPeerStorer creates a new empty addressBook with no providers

type StringPeerPeerSyncMap added in v0.4.0

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

StringPeerPeerSyncMap -

func NewStringPeerPeerSyncMap added in v0.4.0

func NewStringPeerPeerSyncMap() *StringPeerPeerSyncMap

NewStringPeerPeerSyncMap constructs a new SyncMap

func (*StringPeerPeerSyncMap) Delete added in v0.4.0

func (m *StringPeerPeerSyncMap) Delete(k string)

Delete -

func (*StringPeerPeerSyncMap) Get added in v0.4.0

func (m *StringPeerPeerSyncMap) Get(k string) (*peer.Peer, bool)

Get -

func (*StringPeerPeerSyncMap) Put added in v0.4.0

func (m *StringPeerPeerSyncMap) Put(k string, v *peer.Peer)

Put -

func (*StringPeerPeerSyncMap) Range added in v0.4.0

func (m *StringPeerPeerSyncMap) Range(i func(k string, v *peer.Peer) bool)

Range -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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