mirror of
https://github.com/0x1d/rcond.git
synced 2025-12-14 18:25:21 +01:00
feat: introduce cluster agent
This commit is contained in:
@@ -7,7 +7,8 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Rcond RcondConfig `yaml:"rcond"`
|
||||
Rcond RcondConfig `yaml:"rcond"`
|
||||
Cluster ClusterConfig `yaml:"cluster"`
|
||||
}
|
||||
|
||||
type RcondConfig struct {
|
||||
@@ -15,6 +16,17 @@ type RcondConfig struct {
|
||||
ApiToken string `yaml:"api_token"`
|
||||
}
|
||||
|
||||
type ClusterConfig struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
NodeName string `yaml:"node_name"`
|
||||
SecretKey string `yaml:"secret_key"`
|
||||
Join []string `yaml:"join"`
|
||||
AdvertiseAddr string `yaml:"advertise_addr"`
|
||||
AdvertisePort int `yaml:"advertise_port"`
|
||||
BindAddr string `yaml:"bind_addr"`
|
||||
BindPort int `yaml:"bind_port"`
|
||||
}
|
||||
|
||||
func LoadConfig(path string) (*Config, error) {
|
||||
yamlFile, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user