summaryrefslogtreecommitdiffstats
path: root/lib/xdsconfig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xdsconfig')
-rw-r--r--lib/xdsconfig/config.go6
-rw-r--r--lib/xdsconfig/configfile.go10
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/xdsconfig/config.go b/lib/xdsconfig/config.go
index b7bf57b..352ba84 100644
--- a/lib/xdsconfig/config.go
+++ b/lib/xdsconfig/config.go
@@ -91,6 +91,12 @@ func Init(ctx *cli.Context, log *logrus.Logger) (*Config, error) {
SThgConf: &SyncThingConf{
Home: defaultSTHomeDir,
},
+ ProfileConf: ProfileConfT{
+ XDSBinder: XDSBinderConf{
+ URL: "http://localhost:5678",
+ ConnRetry: 10,
+ },
+ },
},
Log: log,
}
diff --git a/lib/xdsconfig/configfile.go b/lib/xdsconfig/configfile.go
index 009517f..1390456 100644
--- a/lib/xdsconfig/configfile.go
+++ b/lib/xdsconfig/configfile.go
@@ -43,6 +43,15 @@ type XDSServerConf struct {
APIPartialURL string `json:"-"`
}
+type XDSBinderConf struct {
+ URL string `json:"url"`
+ ConnRetry int `json:"connRetry"`
+}
+
+type ProfileConfT struct {
+ XDSBinder XDSBinderConf `json:"xdsBinder"`
+}
+
type FileConfig struct {
HTTPPort string `json:"httpPort"`
WebAppDir string `json:"webAppDir"`
@@ -50,6 +59,7 @@ type FileConfig struct {
XDSAPIKey string `json:"xds-apikey"`
ServersConf []XDSServerConf `json:"xdsServers"`
SThgConf *SyncThingConf `json:"syncthing"`
+ ProfileConf ProfileConfT `json:"profileConf"`
}
// readGlobalConfig reads configuration from a config file.