summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/platform/model/cluster_info.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-08-16 23:37:37 +0200
committerWim <wim@42.be>2017-08-16 23:37:37 +0200
commitb963f83c6a09da1eaf02eb9f269c6f5881a0c711 (patch)
tree5ec37162046349d23c627e9ee26fb70c1a6c4f08 /vendor/github.com/mattermost/platform/model/cluster_info.go
parentf6297ebbb09611165a50a6cd15abf6499268cf86 (diff)
downloadmatterbridge-msglm-b963f83c6a09da1eaf02eb9f269c6f5881a0c711.tar.gz
matterbridge-msglm-b963f83c6a09da1eaf02eb9f269c6f5881a0c711.tar.bz2
matterbridge-msglm-b963f83c6a09da1eaf02eb9f269c6f5881a0c711.zip
Update mattermost vendor (3.7 => 4.1)
Diffstat (limited to 'vendor/github.com/mattermost/platform/model/cluster_info.go')
-rw-r--r--vendor/github.com/mattermost/platform/model/cluster_info.go27
1 files changed, 11 insertions, 16 deletions
diff --git a/vendor/github.com/mattermost/platform/model/cluster_info.go b/vendor/github.com/mattermost/platform/model/cluster_info.go
index 7c3384ae..1e468044 100644
--- a/vendor/github.com/mattermost/platform/model/cluster_info.go
+++ b/vendor/github.com/mattermost/platform/model/cluster_info.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package model
@@ -6,16 +6,14 @@ package model
import (
"encoding/json"
"io"
+ "strings"
)
type ClusterInfo struct {
- Id string `json:"id"`
- Version string `json:"version"`
- ConfigHash string `json:"config_hash"`
- InterNodeUrl string `json:"internode_url"`
- Hostname string `json:"hostname"`
- LastSuccessfulPing int64 `json:"last_ping"`
- IsAlive bool `json:"is_alive"`
+ Version string `json:"version"`
+ ConfigHash string `json:"config_hash"`
+ IpAddress string `json:"ipaddress"`
+ Hostname string `json:"hostname"`
}
func (me *ClusterInfo) ToJson() string {
@@ -27,6 +25,11 @@ func (me *ClusterInfo) ToJson() string {
}
}
+func (me *ClusterInfo) Copy() *ClusterInfo {
+ json := me.ToJson()
+ return ClusterInfoFromJson(strings.NewReader(json))
+}
+
func ClusterInfoFromJson(data io.Reader) *ClusterInfo {
decoder := json.NewDecoder(data)
var me ClusterInfo
@@ -38,14 +41,6 @@ func ClusterInfoFromJson(data io.Reader) *ClusterInfo {
}
}
-func (me *ClusterInfo) HaveEstablishedInitialContact() bool {
- if me.Id != "" {
- return true
- }
-
- return false
-}
-
func ClusterInfosToJson(objmap []*ClusterInfo) string {
if b, err := json.Marshal(objmap); err != nil {
return ""