Documentation ¶
Index ¶
- Variables
- func EnsureNodeConfig(zetaPaths paths.Paths) (*Loader, *Config, error)
- type Config
- type Empty
- type Loader
- type Option
- type Output
- type OutputFlag
- type Passphrase
- type PassphraseFlag
- type PromptString
- type Watcher
- func (w *Watcher) Get() Config
- func (w *Watcher) OnConfigUpdate(fns ...func(Config))
- func (w *Watcher) OnConfigUpdateWithID(fns ...func(Config)) []int
- func (w *Watcher) OnTimeUpdate(_ context.Context, _ time.Time)
- func (w *Watcher) Unregister(ids []int)
- func (w *Watcher) Use(fns ...func(*Config) error)
- type ZetaHomeFlag
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrPassphraseDoNotMatch = errors.New("passphrase do not match")
)
Functions ¶
Types ¶
type Config ¶
type Config struct { Admin admin.Config `group:"Admin" namespace:"admin"` API api.Config `group:"API" namespace:"api"` Blockchain blockchain.Config `group:"Blockchain" namespace:"blockchain"` Collateral collateral.Config `group:"Collateral" namespace:"collateral"` CoreAPI coreapi.Config `group:"CoreAPI" namespace:"coreapi"` Execution execution.Config `group:"Execution" namespace:"execution"` Ethereum eth.Config `group:"Ethereum" namespace:"ethereum"` Processor processor.Config `group:"Processor" namespace:"processor"` Logging logging.Config `group:"Logging" namespace:"logging"` Oracles oracles.Config `group:"Oracles" namespace:"oracles"` Time zetatime.Config `group:"Time" namespace:"time"` Epoch epochtime.Config `group:"Epoch" namespace:"epochtime"` Metrics metrics.Config `group:"Metrics" namespace:"metrics"` Governance governance.Config `group:"Governance" namespace:"governance"` NodeWallet nodewallets.Config `group:"NodeWallet" namespace:"nodewallet"` Assets assets.Config `group:"Assets" namespace:"assets"` Notary notary.Config `group:"Notary" namespace:"notary"` EvtForward evtforward.Config `group:"EvtForward" namespace:"evtForward"` Genesis genesis.Config `group:"Genesis" namespace:"genesis"` Validators validators.Config `group:"Validators" namespace:"validators"` Banking banking.Config `group:"Banking" namespace:"banking"` Stats stats.Config `group:"Stats" namespace:"stats"` NetworkParameters netparams.Config `group:"NetworkParameters" namespace:"netparams"` Limits limits.Config `group:"Limits" namespace:"limits"` Checkpoint checkpoint.Config `group:"Checkpoint" namespace:"checkpoint"` Staking staking.Config `group:"Staking" namespace:"staking"` Broker broker.Config `group:"Broker" namespace:"broker"` Rewards rewards.Config `group:"Rewards" namespace:"rewards"` Delegation delegation.Config `group:"Delegation" namespace:"delegation"` Spam spam.Config `group:"Spam" namespace:"spam"` PoW pow.Config `group:"ProofOfWork" namespace:"pow"` Snapshot snapshot.Config `group:"Snapshot" namespace:"snapshot"` StateVar statevar.Config `group:"StateVar" namespace:"statevar"` ERC20MultiSig erc20multisig.Config `group:"ERC20MultiSig" namespace:"erc20multisig"` ProtocolUpgrade protocolupgrade.Config `group:"ProtocolUpgrade" namespace:"protocolupgrade"` Pprof pprof.Config `group:"Pprof" namespace:"pprof"` NodeMode cfgencoding.NodeMode `long:"mode" description:"The mode of the zeta node [validator, full]"` MaxMemoryPercent uint8 `long:"max-memory-percent" description:"The maximum amount of memory reserved for the zeta node (default: 33%)"` }
Config ties together all other application configuration types.
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig returns a set of default configs for all zeta packages, as specified at the per package config level, if there is an error initialising any of the configs then this is returned.
func (Config) GetMaxMemoryFactor ¶
func (Config) HaveEthClient ¶
func (Config) IsValidator ¶
func (*Config) SetDefaultMaxMemoryPercent ¶
func (c *Config) SetDefaultMaxMemoryPercent()
type Empty ¶
type Empty struct{}
Empty is used when a command or sub-command receives no argument and has no execution.
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func (*Loader) ConfigExists ¶
func (*Loader) ConfigFilePath ¶
type OutputFlag ¶
type OutputFlag struct {
Output Output `long:"output" description:"Specify the output format: json,human" default:"human" required:"true"`
}
func (OutputFlag) GetOutput ¶
func (f OutputFlag) GetOutput() (Output, error)
type Passphrase ¶
type Passphrase string
type PassphraseFlag ¶
type PassphraseFlag struct {
PassphraseFile Passphrase `` /* 126-byte string literal not displayed */
}
type PromptString ¶
type PromptString string
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher is looking for updates in the configurations files.
func NewWatcher ¶
func NewWatcher(ctx context.Context, log *logging.Logger, zetaPaths paths.Paths, opts ...Option) (*Watcher, error)
NewWatcher instantiate a new watcher from the zeta config files.
func (*Watcher) OnConfigUpdate ¶
OnConfigUpdate register a function to be called when the configuration is getting updated.
func (*Watcher) OnConfigUpdateWithID ¶
OnConfigUpdate register a function to be called when the configuration is getting updated.
func (*Watcher) Unregister ¶
type ZetaHomeFlag ¶
type ZetaHomeFlag struct {
ZetaHome string `long:"home" description:"Path to the custom home for zeta"`
}
Click to show internal directories.
Click to hide internal directories.