locator

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2017 License: Apache-2.0 Imports: 24 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"`
	Store      storeConfig        `required:"true" yaml:"store"`
}

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