summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-08-04 09:25:37 -0800
committerHarrison Healey <harrisonmhealey@gmail.com>2016-08-04 13:25:37 -0400
commit59d971dc751b0414c5b38c9df4b552e45f5641be (patch)
treed8c39aa5d1fa67d41d89bdd37f699a8e7ca7af36 /model/config.go
parentac90f5b38962c301318fff9118c4556537002941 (diff)
downloadchat-59d971dc751b0414c5b38c9df4b552e45f5641be.tar.gz
chat-59d971dc751b0414c5b38c9df4b552e45f5641be.tar.bz2
chat-59d971dc751b0414c5b38c9df4b552e45f5641be.zip
PLT-2899 adding clustering of app servers (#3682)
* PLT-2899 adding clustering of app servers * PLT-2899 base framework * PLT-2899 HA backend * PLT-2899 Fixing config file * PLT-2899 adding config syncing * PLT-2899 set System console to readonly when clustering enabled. * PLT-2899 Fixing publish API * PLT-2899 fixing strings
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go
index b239c83ca..7fe575e58 100644
--- a/model/config.go
+++ b/model/config.go
@@ -80,6 +80,12 @@ type ServiceSettings struct {
RestrictCustomEmojiCreation *string
}
+type ClusterSettings struct {
+ Enable *bool
+ InterNodeListenAddress *string
+ InterNodeUrls []string
+}
+
type SSOSettings struct {
Enable bool
Secret string
@@ -297,6 +303,7 @@ type Config struct {
LocalizationSettings LocalizationSettings
SamlSettings SamlSettings
NativeAppSettings NativeAppSettings
+ ClusterSettings ClusterSettings
}
func (o *Config) ToJson() string {
@@ -707,6 +714,20 @@ func (o *Config) SetDefaults() {
*o.ServiceSettings.RestrictCustomEmojiCreation = RESTRICT_EMOJI_CREATION_ALL
}
+ if o.ClusterSettings.InterNodeListenAddress == nil {
+ o.ClusterSettings.InterNodeListenAddress = new(string)
+ *o.ClusterSettings.InterNodeListenAddress = ":8075"
+ }
+
+ if o.ClusterSettings.Enable == nil {
+ o.ClusterSettings.Enable = new(bool)
+ *o.ClusterSettings.Enable = false
+ }
+
+ if o.ClusterSettings.InterNodeUrls == nil {
+ o.ClusterSettings.InterNodeUrls = []string{}
+ }
+
if o.ComplianceSettings.Enable == nil {
o.ComplianceSettings.Enable = new(bool)
*o.ComplianceSettings.Enable = false