Documentation
¶
Index ¶
- Variables
- func ParseArgumentsNetwork(flags *flag.FlagSet, options *node.OptionsNetwork)
- func ParseDirectoryArguments(flags *flag.FlagSet, options *node.OptionsDirectory) error
- func ParseFlagsDirectory(ctx *cli.Context) node.OptionsDirectory
- func ParseFlagsLocation(ctx *cli.Context) node.OptionsLocation
- func ParseFlagsNetwork(ctx *cli.Context) node.OptionsNetwork
- func ParseFlagsNode(ctx *cli.Context) node.Options
- func RegisterFlagsDirectory(flags *[]cli.Flag) error
- func RegisterFlagsLocation(flags *[]cli.Flag)
- func RegisterFlagsNetwork(flags *[]cli.Flag)
- func RegisterFlagsNode(flags *[]cli.Flag) error
- func RegisterSignalCallback(callback SignalCallback)
- type Dependencies
- type SignalCallback
Constants ¶
This section is empty.
Variables ¶
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 ¶
ParseFlagsNode function fills in node options from CLI context
func RegisterFlagsDirectory ¶
RegisterFlagsDirectory function register directory flags to flag list
func RegisterFlagsLocation ¶
RegisterFlagsLocation function register location flags to flag list
func RegisterFlagsNetwork ¶
RegisterFlagsNetwork function register network flags to flag list
func RegisterFlagsNode ¶
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