github.com/trigonella/mattermost-server@v5.11.1+incompatible/einterfaces/cluster.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package einterfaces 5 6 import ( 7 "github.com/mattermost/mattermost-server/model" 8 ) 9 10 type ClusterMessageHandler func(msg *model.ClusterMessage) 11 12 type ClusterInterface interface { 13 StartInterNodeCommunication() 14 StopInterNodeCommunication() 15 RegisterClusterMessageHandler(event string, crm ClusterMessageHandler) 16 GetClusterId() string 17 IsLeader() bool 18 GetMyClusterInfo() *model.ClusterInfo 19 GetClusterInfos() []*model.ClusterInfo 20 SendClusterMessage(cluster *model.ClusterMessage) 21 NotifyMsg(buf []byte) 22 GetClusterStats() ([]*model.ClusterStats, *model.AppError) 23 GetLogs(page, perPage int) ([]string, *model.AppError) 24 GetPluginStatuses() (model.PluginStatuses, *model.AppError) 25 ConfigChanged(previousConfig *model.Config, newConfig *model.Config, sendToOtherServer bool) *model.AppError 26 }