agent

package
v0.0.0-...-8f649d9 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: LGPL-3.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

Agent is a long running daemon that is used to run the ethereum client

func NewAgent

func NewAgent(logger *log.Logger, config *Config) *Agent

func (*Agent) Close

func (a *Agent) Close()

func (*Agent) Start

func (a *Agent) Start() error

Start starts the agent

type BackendConfig

type BackendConfig map[string]interface{}

BackendConfig is the configuration for the backends

type BlockchainConfig

type BlockchainConfig struct {
	Backend string        `json:"backend"`
	Config  BackendConfig `json:"config"`
}

BlockchainConfig is the blockchain configuration

type Config

type Config struct {
	Chain       string     `json:"chain"`
	DataDir     string     `json:"data_dir"`
	BindAddr    string     `json:"bind_addr"`
	BindPort    int        `json:"bind_port"`
	RPCAddr     string     `json:"rpc_addr"`
	RPCPort     int        `json:"rpc_port"`
	Telemetry   *Telemetry `json:"telemetry"`
	ServiceName string     `json:"service_name"`
	Seal        bool       `json:"seal"`
	LogLevel    string     `json:"log_level"`

	Blockchain *BlockchainConfig        `json:"blockchain"`
	Protocols  map[string]BackendConfig `json:"protocols"`
	Discovery  map[string]BackendConfig `json:"discovery"`
	Consensus  BackendConfig            `json:"consensus"`
	API        map[string]BackendConfig `json:"api"`

	StateStorage string `json:"state_storage"`
}

func DefaultConfig

func DefaultConfig() *Config

func (*Config) Merge

func (c *Config) Merge(c1 ...*Config) error

Merge merges configurations

type Telemetry

type Telemetry struct {
	PrometheusPort int `json:"prometheus_port"`
}

Jump to

Keyboard shortcuts

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