5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-28 02:05:39 +00:00
matterbridge/vendor/github.com/mattermost/mattermost-server/einterfaces/cluster.go

26 lines
843 B
Go
Raw Normal View History

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