node

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2018 License: Apache-2.0 Imports: 38 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 struct {
	Node              nodeConfig          `yaml:"node"`
	NPP               npp.Config          `yaml:"npp"`
	Log               logging.Config      `yaml:"log"`
	Blockchain        *blockchain.Config  `yaml:"blockchain"`
	Eth               accounts.EthConfig  `yaml:"ethereum" required:"false"`
	DWH               dwh.YAMLConfig      `yaml:"dwh"`
	MetricsListenAddr string              `yaml:"metrics_listen_addr" default:"127.0.0.1:14003"`
	Benchmarks        benchmarks.Config   `yaml:"benchmarks"`
	Matcher           *matcher.YAMLConfig `yaml:"matcher"`
}

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, config *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 Worker

func (*Node) Close added in v0.4.1

func (n *Node) Close()

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

func (*Node) ServeGRPC added in v0.4.1

func (n *Node) ServeGRPC() error

func (*Node) ServeHttp added in v0.4.1

func (n *Node) ServeHttp() error

Jump to

Keyboard shortcuts

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