mirror of https://github.com/status-im/consul.git
Allow for enterprise only leader routines (#6533)
Eventually I am thinking we may need a way to register these at different priority levels but for now sticking this here is fine
This commit is contained in:
parent
e63490066b
commit
100ebd63f9
|
@ -41,3 +41,11 @@ func (s *Server) handleEnterpriseLeave() {
|
||||||
func (s *Server) enterpriseStats() map[string]map[string]string {
|
func (s *Server) enterpriseStats() map[string]map[string]string {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Server) establishEnterpriseLeadership() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *Server) revokeEnterpriseLeadership() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
|
@ -309,6 +309,10 @@ func (s *Server) establishLeadership() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := s.establishEnterpriseLeadership(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// attempt to bootstrap config entries
|
// attempt to bootstrap config entries
|
||||||
if err := s.bootstrapConfigEntries(s.config.ConfigEntryBootstrap); err != nil {
|
if err := s.bootstrapConfigEntries(s.config.ConfigEntryBootstrap); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -340,6 +344,8 @@ func (s *Server) revokeLeadership() {
|
||||||
// are no longer responsible for session expirations.
|
// are no longer responsible for session expirations.
|
||||||
s.clearAllSessionTimers()
|
s.clearAllSessionTimers()
|
||||||
|
|
||||||
|
s.revokeEnterpriseLeadership()
|
||||||
|
|
||||||
s.stopConfigReplication()
|
s.stopConfigReplication()
|
||||||
|
|
||||||
s.stopConnectLeader()
|
s.stopConnectLeader()
|
||||||
|
|
Loading…
Reference in New Issue