cmd

package
v0.0.0-...-be0919c Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// LocationCountryFlag allows to configure service country manually
	LocationCountryFlag = cli.StringFlag{
		Name:  "location.country",
		Usage: "Service location country. If not given country is autodetected",
		Value: "",
	}
)

Functions

func ParseArgumentsNetwork

func ParseArgumentsNetwork(flags *flag.FlagSet, options *node.OptionsNetwork)

ParseArgumentsNetwork function parses (or registers) network options from flag library

func ParseDirectoryArguments

func ParseDirectoryArguments(flags *flag.FlagSet, options *node.OptionsDirectory) error

ParseDirectoryArguments function takes directory options and fills in values from FlagSet structure

func ParseFlagsDirectory

func ParseFlagsDirectory(ctx *cli.Context) node.OptionsDirectory

ParseFlagsDirectory function fills in directory options from CLI context

func ParseFlagsLocation

func ParseFlagsLocation(ctx *cli.Context) node.OptionsLocation

ParseFlagsLocation function fills in location options from CLI context

func ParseFlagsNetwork

func ParseFlagsNetwork(ctx *cli.Context) node.OptionsNetwork

ParseFlagsNetwork function fills in directory options from CLI context

func ParseFlagsNode

func ParseFlagsNode(ctx *cli.Context) node.Options

ParseFlagsNode function fills in node options from CLI context

func RegisterFlagsDirectory

func RegisterFlagsDirectory(flags *[]cli.Flag) error

RegisterFlagsDirectory function register directory flags to flag list

func RegisterFlagsLocation

func RegisterFlagsLocation(flags *[]cli.Flag)

RegisterFlagsLocation function register location flags to flag list

func RegisterFlagsNetwork

func RegisterFlagsNetwork(flags *[]cli.Flag)

RegisterFlagsNetwork function register network flags to flag list

func RegisterFlagsNode

func RegisterFlagsNode(flags *[]cli.Flag) error

RegisterFlagsNode function register node flags to flag list

func RegisterSignalCallback

func RegisterSignalCallback(callback SignalCallback)

RegisterSignalCallback registers given callback to call on SIGTERM and SIGHUP interrupts

Types

type Dependencies

type Dependencies struct {
	NodeOptions node.Options
	Node        *node.Node

	NetworkDefinition metadata.NetworkDefinition
	MysteriumClient   server.Client
	EtherClient       *ethclient.Client

	Keystore             *keystore.KeyStore
	IdentityManager      identity.Manager
	SignerFactory        identity.SignerFactory
	IdentityRegistry     identity_registry.IdentityRegistry
	IdentityRegistration identity_registry.RegistrationDataProvider

	IPResolver       ip.Resolver
	LocationResolver location.Resolver

	ServiceManager *service.Manager
}

Dependencies is DI container for top level components which is reusedin several places

func (*Dependencies) Bootstrap

func (di *Dependencies) Bootstrap(nodeOptions node.Options) error

Bootstrap initiates all container dependencies

func (*Dependencies) BootstrapServiceComponents

func (di *Dependencies) BootstrapServiceComponents(nodeOptions node.Options, serviceOptions service.Options)

BootstrapServiceComponents initiates ServiceManager dependency

func (*Dependencies) Shutdown

func (di *Dependencies) Shutdown() (err error)

Shutdown stops container

type SignalCallback

type SignalCallback func()

SignalCallback is invoked when process receives signals defined below

Directories

Path Synopsis
commands
cli

Jump to

Keyboard shortcuts

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