Documentation
¶
Index ¶
- Constants
- type AssetsConfig
- type AutoInstallConfig
- type BinaryConfig
- type DataNodeConfig
- type RPCConfig
- type RunConfig
- type VegaConfig
- type VisorConfig
- func (pc *VisorConfig) AutoInstall() AutoInstallConfig
- func (pc *VisorConfig) CurrentFolder() string
- func (pc *VisorConfig) CurrentRunConfigPath() string
- func (pc *VisorConfig) GenesisFolder() string
- func (pc *VisorConfig) MaxNumberOfFirstConnectionRetries() int
- func (pc *VisorConfig) MaxNumberOfRestarts() int
- func (pc *VisorConfig) RestartsDelaySeconds() int
- func (pc *VisorConfig) StopDelaySeconds() int
- func (pc *VisorConfig) StopSignalTimeoutSeconds() int
- func (pc *VisorConfig) UpgradeFolder(releaseTag string) string
- func (pc *VisorConfig) WatchForUpdate(ctx context.Context) error
- func (pc *VisorConfig) WriteToFile() error
- type VisorConfigFile
Constants ¶
View Source
const ( RunConfigFileName = "run-config.toml" VegaBinaryName = "vega" DataNodeBinaryName = "data-node" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetsConfig ¶
type AssetsConfig struct {
// description: Name of the asset file on Github.
Name string `toml:"name"`
/*
description: |
Name of the binary if the asset is a zip file and the binary is included inside of it.
*/
BinaryName *string `toml:"binaryName"`
}
description: Defines the name of the asset to be downloaded.
func (AssetsConfig) GetBinaryPath ¶ added in v0.71.0
func (a AssetsConfig) GetBinaryPath() string
type AutoInstallConfig ¶
type AutoInstallConfig struct {
/*
description: Auto Install flag
default: true
*/
Enabled bool `toml:"enabled"`
/*
description: Owner of the repository from where the assets should be downloaded.
default: vegaprotocol
*/
GithubRepositoryOwner string `toml:"repositoryOwner"`
/*
description: Name of the repository from where the assets should be downloaded.
default: vega
*/
GithubRepository string `toml:"repository"`
/*
description: |
Definition of the asset that should be downloaded from the GitHub repository.
If the asset is contained in a zip file, the name of the binary is given.
example:
type: toml
value: |
[autoInstall.asset]
name = "vega-darwin-amd64.zip"
binaryName = "vega"
*/
Asset AssetsConfig `toml:"asset"`
}
description: Determines if the assets should be automatically downloaded and installed. If so this defines the assets that should be downloaded from GitHub for a specific release.
example:
type: toml value: | [autoInstall] enabled = true repositoryOwner = "vegaprotocol" repository = "vega" [autoInstall.asset] name = "vega-darwin-amd64.zip" binaryName = "vega"
type BinaryConfig ¶
type BinaryConfig struct {
/*
description: Path to the Vega binary.
note: |
The absolute or relative path can be used.
Relative path is relative to a parent folder of this config file.
*/
Path string `toml:"path"`
/*
description: Arguments that will be applied to the binary.
note: |
Each element the list represents one space separated argument.
*/
Args []string `toml:"args"`
}
description: Configuration options for the Vega binary and its arguments. example:
type: toml value: | path = "/path/binary" args = ["--arg1", "val1", "--arg2"]
type DataNodeConfig ¶
type DataNodeConfig struct {
Binary BinaryConfig `toml:"binary"`
}
description: Configures a data node binary and its arguments. example:
type: toml value: | [data_node] [data_node.binary] path = "/path/data-node-binary" args = ["--arg1", "val1", "--arg2"]
type RPCConfig ¶
type RPCConfig struct {
/*
description: Path of the mounted socket.
note: This path can be configured in the Vega core node configuration and can be found in the [Admin.Server] section.
*/
SocketPath string `toml:"socketPath"`
/*
description: HTTP path of the socket path.
note: This path can be configured in the Vega core node configuration and can be found in the [Admin.Server] section.
*/
HTTPPath string `toml:"httpPath"`
}
description: Configures a connection to a core node's exposed UNIX socket RPC API. example:
type: toml value: | [vega.rpc] socketPath = "/path/socket.sock" httpPath = "/rpc"
type RunConfig ¶
type RunConfig struct {
/*
description: Name of the upgrade.
note: |
It is recommended to use the Vega version you wish to upgrade to as the name. These can be found in the releases list of the Vega Github repository
(https://github.com/vegaprotocol/vega/releases).
*/
Name string `toml:"name"`
// description: Configuration of a Vega node.
Vega VegaConfig `toml:"vega"`
// description: Configuration of a data node.
DataNode *DataNodeConfig `toml:"data_node"`
}
description: Root of the config file example:
type: toml value: | name = "v1.65.0" [vega] [vega.binary] path = "/path/vega-binary" args = ["--arg1", "val1", "--arg2"] [vega.rpc] socketPath = "/path/socket.sock" httpPath = "/rpc"
func ExampleRunConfig ¶
func ParseRunConfig ¶
func (*RunConfig) WriteToFile ¶
type VegaConfig ¶
type VegaConfig struct {
/*
description: Configuration of Vega binary and the arguments to run it.
example:
type: toml
value: |
[vega.binary]
path = "/path/vega-binary"
args = ["--arg1", "val1", "--arg2"]
*/
Binary BinaryConfig `toml:"binary"`
/*
description: |
Visor communicates with the core node via RPC API that runs over a UNIX socket.
This parameter configures the UNIX socket to match the core node configuration.
This value can be found in the config.toml file used by the core node under the heading [Admin.Server]
example:
type: toml
value: |
[vega.binary]
path = "/path/vega-binary"
args = ["--arg1", "val1", "--arg2"]
*/
RCP RPCConfig `toml:"rpc"`
}
description: Configuration options for the Vega binary and its arguments. example:
type: toml value: | [vega] [vega.binary] path = "/path/vega-binary" args = ["--arg1", "val1", "--arg2"] [vega.rpc] socketPath = "/path/socket.sock" httpPath = "/rpc"
type VisorConfig ¶
type VisorConfig struct {
// contains filtered or unexported fields
}
func DefaultVisorConfig ¶
func DefaultVisorConfig(log *logging.Logger, homePath string) *VisorConfig
func NewVisorConfig ¶
func NewVisorConfig(log *logging.Logger, homePath string) (*VisorConfig, error)
func (*VisorConfig) AutoInstall ¶
func (pc *VisorConfig) AutoInstall() AutoInstallConfig
func (*VisorConfig) CurrentFolder ¶
func (pc *VisorConfig) CurrentFolder() string
func (*VisorConfig) CurrentRunConfigPath ¶
func (pc *VisorConfig) CurrentRunConfigPath() string
func (*VisorConfig) GenesisFolder ¶
func (pc *VisorConfig) GenesisFolder() string
func (*VisorConfig) MaxNumberOfFirstConnectionRetries ¶ added in v0.62.0
func (pc *VisorConfig) MaxNumberOfFirstConnectionRetries() int
func (*VisorConfig) MaxNumberOfRestarts ¶
func (pc *VisorConfig) MaxNumberOfRestarts() int
func (*VisorConfig) RestartsDelaySeconds ¶
func (pc *VisorConfig) RestartsDelaySeconds() int
func (*VisorConfig) StopDelaySeconds ¶ added in v0.71.0
func (pc *VisorConfig) StopDelaySeconds() int
func (*VisorConfig) StopSignalTimeoutSeconds ¶
func (pc *VisorConfig) StopSignalTimeoutSeconds() int
func (*VisorConfig) UpgradeFolder ¶
func (pc *VisorConfig) UpgradeFolder(releaseTag string) string
func (*VisorConfig) WatchForUpdate ¶
func (pc *VisorConfig) WatchForUpdate(ctx context.Context) error