matterbridge/vendor/github.com/mattermost/mattermost-server/einterfaces/cluster.go

26 lines
843 B
Go
Raw Normal View History

2017-08-16 23:37:37 +02:00
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2016-08-15 18:47:31 +02:00
// See License.txt for license information.
package einterfaces
import (
2018-02-09 00:11:04 +01:00
"github.com/mattermost/mattermost-server/model"
2016-08-15 18:47:31 +02:00
)
2017-08-16 23:37:37 +02:00
type ClusterMessageHandler func(msg *model.ClusterMessage)
2016-08-15 18:47:31 +02:00
type ClusterInterface interface {
StartInterNodeCommunication()
StopInterNodeCommunication()
2017-08-16 23:37:37 +02:00
RegisterClusterMessageHandler(event string, crm ClusterMessageHandler)
GetClusterId() string
2018-02-09 00:11:04 +01:00
IsLeader() bool
GetMyClusterInfo() *model.ClusterInfo
2016-08-15 18:47:31 +02:00
GetClusterInfos() []*model.ClusterInfo
2017-08-16 23:37:37 +02:00
SendClusterMessage(cluster *model.ClusterMessage)
NotifyMsg(buf []byte)
2017-01-16 23:59:50 +01:00
GetClusterStats() ([]*model.ClusterStats, *model.AppError)
2017-08-16 23:37:37 +02:00
GetLogs(page, perPage int) ([]string, *model.AppError)
2016-08-15 18:47:31 +02:00
ConfigChanged(previousConfig *model.Config, newConfig *model.Config, sendToOtherServer bool) *model.AppError
}