mirror of https://github.com/hashicorp/consul
agent: remove unnecessary EventFire function
parent
7e63572df6
commit
18715a445c
|
@ -72,7 +72,7 @@ func (m *Internal) EventFire(args *structs.EventFireRequest,
|
||||||
m.srv.setQueryMeta(&reply.QueryMeta)
|
m.srv.setQueryMeta(&reply.QueryMeta)
|
||||||
|
|
||||||
// Fire the event
|
// Fire the event
|
||||||
return m.srv.UserEvent(args.Name, args.Payload)
|
return m.srv.serfLAN.UserEvent(args.Name, args.Payload, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// KeyringOperation will query the WAN and LAN gossip keyrings of all nodes.
|
// KeyringOperation will query the WAN and LAN gossip keyrings of all nodes.
|
||||||
|
|
|
@ -616,11 +616,6 @@ func (s *Server) RemoveFailedNode(node string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserEvent is used to fire an event via the Serf layer on the LAN
|
|
||||||
func (s *Server) UserEvent(name string, payload []byte) error {
|
|
||||||
return s.serfLAN.UserEvent(userEventName(name), payload, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsLeader checks if this server is the cluster leader
|
// IsLeader checks if this server is the cluster leader
|
||||||
func (s *Server) IsLeader() bool {
|
func (s *Server) IsLeader() bool {
|
||||||
return s.raft.State() == raft.Leader
|
return s.raft.State() == raft.Leader
|
||||||
|
|
Loading…
Reference in New Issue