2017-04-12 08:27:57 -04:00
|
|
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
2019-11-29 12:59:40 +01:00
|
|
|
// See LICENSE.txt for license information.
|
2016-08-04 09:25:37 -08:00
|
|
|
|
|
|
|
|
package einterfaces
|
|
|
|
|
|
|
|
|
|
import (
|
2019-11-28 14:39:38 +01:00
|
|
|
"github.com/mattermost/mattermost-server/v5/model"
|
2016-08-04 09:25:37 -08:00
|
|
|
)
|
|
|
|
|
|
2017-06-19 08:44:04 -07:00
|
|
|
type ClusterMessageHandler func(msg *model.ClusterMessage)
|
|
|
|
|
|
2016-08-04 09:25:37 -08:00
|
|
|
type ClusterInterface interface {
|
|
|
|
|
StartInterNodeCommunication()
|
|
|
|
|
StopInterNodeCommunication()
|
2017-06-19 08:44:04 -07:00
|
|
|
RegisterClusterMessageHandler(event string, crm ClusterMessageHandler)
|
|
|
|
|
GetClusterId() string
|
2017-08-16 10:29:45 -07:00
|
|
|
IsLeader() bool
|
2020-06-24 18:46:33 +05:30
|
|
|
// HealthScore returns a number which is indicative of how well an instance is meeting
|
|
|
|
|
// the soft real-time requirements of the protocol. Lower numbers are better,
|
|
|
|
|
// and zero means "totally healthy".
|
|
|
|
|
HealthScore() int
|
2017-09-05 07:58:30 -07:00
|
|
|
GetMyClusterInfo() *model.ClusterInfo
|
2016-08-04 09:25:37 -08:00
|
|
|
GetClusterInfos() []*model.ClusterInfo
|
2017-06-19 08:44:04 -07:00
|
|
|
SendClusterMessage(cluster *model.ClusterMessage)
|
|
|
|
|
NotifyMsg(buf []byte)
|
2016-11-28 07:40:02 -08:00
|
|
|
GetClusterStats() ([]*model.ClusterStats, *model.AppError)
|
2017-03-16 14:59:44 -04:00
|
|
|
GetLogs(page, perPage int) ([]string, *model.AppError)
|
2018-05-23 14:26:35 -04:00
|
|
|
GetPluginStatuses() (model.PluginStatuses, *model.AppError)
|
2016-08-04 09:25:37 -08:00
|
|
|
ConfigChanged(previousConfig *model.Config, newConfig *model.Config, sendToOtherServer bool) *model.AppError
|
|
|
|
|
}
|