locator

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenAddr        string             `yaml:"address"`
	NodeTTL           time.Duration      `yaml:"node_ttl"`
	Eth               accounts.EthConfig `required:"true" yaml:"ethereum"`
	OnlyPublicIPs     bool               `required:"false" yaml:"only_public_ips"`
	Store             storeConfig        `required:"true" yaml:"store"`
	MetricsListenAddr string             `yaml:"metrics_listen_addr" default:"127.0.0.1:14002"`
}

func NewConfig

func NewConfig(path string) (*Config, error)

NewConfig loads a hub config from the specified YAML file.

type Locator

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

func NewLocator

func NewLocator(ctx context.Context, conf *Config, key *ecdsa.PrivateKey) (l *Locator, err error)

func (*Locator) Announce

func (l *Locator) Announce(ctx context.Context, req *pb.AnnounceRequest) (*pb.Empty, error)

func (*Locator) Resolve

func (l *Locator) Resolve(ctx context.Context, req *pb.ResolveRequest) (*pb.ResolveReply, error)

func (*Locator) Serve

func (l *Locator) Serve() error

Jump to

Keyboard shortcuts

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