Documentation ¶
Index ¶
- Variables
- func EnsureNodeConfig(vegaPaths paths.Paths) (*Loader, *Config, error)
- type Config
- type Empty
- type Loader
- type Option
- type Output
- type OutputFlag
- type Passphrase
- type PassphraseFlag
- type PromptString
- type VegaHomeFlag
- 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)
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 spec.Config `group:"Oracles" namespace:"oracles"` Time vegatime.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"` Vesting vesting.Config `group:"Vesting" namespace:"vesting"` NodeMode cfgencoding.NodeMode `description:"The mode of the vega node [validator, full]" long:"mode"` MaxMemoryPercent uint8 `description:"The maximum amount of memory reserved for the vega node (default: 33%)" long:"max-memory-percent"` }
Config ties together all other application configuration types.
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig returns a set of default configs for all vega 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 ¶ added in v0.66.0
func (Config) HaveEthClient ¶
func (Config) IsValidator ¶
func (*Config) SetDefaultMaxMemoryPercent ¶ added in v0.66.0
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 `default:"human" description:"Specify the output format: json,human" long:"output" 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 VegaHomeFlag ¶
type VegaHomeFlag struct {
VegaHome string `description:"Path to the custom home for vega" long:"home"`
}
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, vegaPaths paths.Paths, migrateConfig func(*Config), opts ...Option) (*Watcher, error)
NewWatcher instantiate a new watcher from the vega 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 ¶
Click to show internal directories.
Click to hide internal directories.