Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteConfig ¶ added in v0.6.0
WriteConfig writes the config as yaml to disk.
func WriteDockerCompose ¶
WriteDockerCompose generates the docker-compose.yml template and writes it to disk.
Types ¶
type Config ¶
type Config struct {
// Version defines the compose config version.
Version string `json:"version"`
// Step defines the current completed compose step.
Step step `json:"step"`
// NumNodes is the number of charon nodes in the cluster.
NumNodes int `json:"num_nodes"`
// Threshold required for signature reconstruction. Defaults to safe value for number of nodes/peers.
Threshold int `json:"threshold"`
// NumValidators is the number of DVs (n*32ETH) to be created in the cluster lock file.
NumValidators int `json:"num_validators"`
// ImageTag defines the charon docker image tag: ghcr.io/obolnetwork/charon:{ImageTag}.
ImageTag string `json:"image_tag"`
// BuildBinary enables building a local charon binary from source and using that in the containers.
BuildBinary bool `json:"build_binary"`
// PrebuiltBinary enables using a prebuilt local charon binary to use in the containers.
PrebuiltBinary bool `json:"prebuilt_binary"`
// KeyGen defines the key generation process.
KeyGen KeyGen `json:"key_gen"`
// SplitKeysDir directory containing keys to split for keygen==create.
SplitKeysDir string `json:"split_keys_dir"`
// BeaconNode url endpoint or "mock" for simnet.
BeaconNode string `json:"beacon_node"`
// ExternalBootnode HTTP url endpoint or empty to disable.
ExternalBootnode string `json:"external_bootnode"`
// VCs define the types of validator clients to use.
VCs []VCType `json:"validator_clients"`
// FeatureSet defines the minimum feature set to enable.
FeatureSet string `json:"feature_set"`
// DisableMonitoringPorts defines whether to disable prometheus and jaeger monitoring port binding.
DisableMonitoringPorts bool `json:"disable_monitoring_ports"`
// DisableLoki defines whether to loki logging driver should be configured.
DisableLoki bool `json:"disable_loki"`
}
Config defines a local compose cluster; including both keygen and running a cluster.
func LoadConfig ¶
LoadConfig returns the config loaded from disk.
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig returns a new default config.
type TmplData ¶
type TmplData struct {
ComposeDir string
CharonImageTag string
CharonEntrypoint string
CharonCommand string
Nodes []TmplNode
VCs []TmplVC
Bootnode bool
Monitoring bool
MonitoringPorts bool
Loki bool
}
TmplData is the docker-compose.yml template data.
type TmplNode ¶ added in v0.10.0
type TmplNode struct {
ImageTag string // ImageTag is empty by default, resulting in CharonImageTag being used.
Entrypoint string // Entrypoint is empty by default, resulting in CharonEntrypoint being used.
EnvVars []kv
Ports []port
}
TmplNode represents a charon TmplNode service in a docker-compose.yml.
Click to show internal directories.
Click to hide internal directories.