node

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: 31 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	// ListenAddress is gRPC endpoint that Node binds to
	ListenAddress() string
	// MarketEndpoint is Marketplace gRPC endpoint
	MarketEndpoint() string
	// HubEndpoint is Hub's gRPC endpoint (not required)
	HubEndpoint() string
	// LocatorEndpoint is Locator service gRPC endpoint
	LocatorEndpoint() string
	// LogLevel return log verbosity
	LogLevel() int
	// MetricsListenAddr returns the address that can be used by Prometheus to get
	// metrics.
	MetricsListenAddr() string
	// KeyStorager included into config because of
	// Node instance must know how to open the keystore
	accounts.KeyStorager
}

Config is LocalNode config

func NewConfig

func NewConfig(path string) (Config, error)

NewConfig loads localNode config from given .yaml file

type HandlerStatus added in v0.3.2

type HandlerStatus uint8

func (HandlerStatus) String added in v0.3.2

func (h HandlerStatus) String() string

type Node

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

Node is LocalNode instance

func New

func New(ctx context.Context, c Config, key *ecdsa.PrivateKey) (*Node, error)

New creates new Local Node instance also method starts internal gRPC client connections to the external services like Market and Hub

func (*Node) InterceptStreamRequest

func (n *Node) InterceptStreamRequest(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

func (*Node) Serve

func (n *Node) Serve() error

Serve binds gRPC services and start it

Jump to

Keyboard shortcuts

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