node

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: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerStatusString

func HandlerStatusString(status uint8) string

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
	// 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 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