MM-21357: Use typed constants ClusterEvent (#17920)
* MM-21357: Use typed constants ClusterEvent Use typed constants for: - model.ClusterEvent https://mattermost.atlassian.net/browse/MM-21357 ```release-note Use typed constant for model.ClusterEvent ``` * trigger CI ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
Claudio Costa
родитель
9ae45d55d9
Коммит
623f8dc9af
@@ -126,7 +126,7 @@ func (c *ClusterMock) SendClusterMessageToNode(nodeID string, msg *model.Cluster
|
||||
|
||||
func (c *ClusterMock) StartInterNodeCommunication() {}
|
||||
func (c *ClusterMock) StopInterNodeCommunication() {}
|
||||
func (c *ClusterMock) RegisterClusterMessageHandler(event string, crm einterfaces.ClusterMessageHandler) {
|
||||
func (c *ClusterMock) RegisterClusterMessageHandler(event model.ClusterEvent, crm einterfaces.ClusterMessageHandler) {
|
||||
}
|
||||
func (c *ClusterMock) GetClusterId() string { return "cluster_mock" }
|
||||
func (c *ClusterMock) IsLeader() bool { return false }
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/mattermost/mattermost-server/v5/model"
|
||||
)
|
||||
|
||||
func (s *Server) notifyClusterPluginEvent(event string, data model.PluginEventData) {
|
||||
func (s *Server) notifyClusterPluginEvent(event model.ClusterEvent, data model.PluginEventData) {
|
||||
if s.Cluster != nil {
|
||||
s.Cluster.SendClusterMessage(&model.ClusterMessage{
|
||||
Event: event,
|
||||
|
||||
Ссылка в новой задаче
Block a user