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

26 lines
843 B
Go
Raw Normal View History

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