Fixing leader election (#7267)

This commit is contained in:
Corey Hulen
2017-09-05 07:58:30 -07:00
committed by GitHub
parent 44e58bd100
commit 7843dc3cfa
2 changed files with 2 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ func GetLogs(page, perPage int) ([]string, *model.AppError) {
if einterfaces.GetClusterInterface() != nil && *utils.Cfg.ClusterSettings.Enable {
lines = append(lines, "-----------------------------------------------------------------------------------------------------------")
lines = append(lines, "-----------------------------------------------------------------------------------------------------------")
lines = append(lines, einterfaces.GetClusterInterface().GetClusterId())
lines = append(lines, einterfaces.GetClusterInterface().GetMyClusterInfo().Hostname)
lines = append(lines, "-----------------------------------------------------------------------------------------------------------")
lines = append(lines, "-----------------------------------------------------------------------------------------------------------")
}

View File

@@ -15,6 +15,7 @@ type ClusterInterface interface {
RegisterClusterMessageHandler(event string, crm ClusterMessageHandler)
GetClusterId() string
IsLeader() bool
GetMyClusterInfo() *model.ClusterInfo
GetClusterInfos() []*model.ClusterInfo
SendClusterMessage(cluster *model.ClusterMessage)
NotifyMsg(buf []byte)