discovery

package
v0.0.0-...-8f649d9 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// Close closes the backend
	Close() error

	// Deliver returns discovered elements
	Deliver() chan string

	// Schedule starts the discovery
	Schedule()
}

Backend interface must be implemented for a discovery protocol

type BackendConfig

type BackendConfig struct {
	// Logger to be used by the backend
	Logger hclog.Logger

	// Enode is the identification of the node
	Enode *enode.Enode

	// Private key of the node to encrypt/decrypt messages
	Key *ecdsa.PrivateKey

	// Specific configuration parameters for the backend
	Config map[string]interface{}
}

BackendConfig contains configuration parameters

type Factory

type Factory func(context.Context, *BackendConfig) (Backend, error)

Factory is the factory function to create a discovery backend

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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