From 59d971dc751b0414c5b38c9df4b552e45f5641be Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Thu, 4 Aug 2016 09:25:37 -0800 Subject: 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 --- model/config.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'model/config.go') 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 -- cgit v1.2.3-1-g7c22