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:
Matt Keeler 2019-09-23 20:09:56 -04:00 committed by GitHub
parent f28b48cfbe
commit 8885c8d318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -41,3 +41,11 @@ func (s *Server) handleEnterpriseLeave() {
func (s *Server) enterpriseStats() map[string]map[string]string {
return nil
}
func (s *Server) establishEnterpriseLeadership() error {
return nil
}
func (s *Server) revokeEnterpriseLeadership() error {
return nil
}

View File

@ -309,6 +309,10 @@ func (s *Server) establishLeadership() error {
return err
}
if err := s.establishEnterpriseLeadership(); err != nil {
return err
}
// attempt to bootstrap config entries
if err := s.bootstrapConfigEntries(s.config.ConfigEntryBootstrap); err != nil {
return err
@ -340,6 +344,8 @@ func (s *Server) revokeLeadership() {
// are no longer responsible for session expirations.
s.clearAllSessionTimers()
s.revokeEnterpriseLeadership()
s.stopConfigReplication()
s.stopConnectLeader()