Updates to allow for using an enterprise specific token as the agents token
This is needed to allow for managed Consul instances to register themselves in the catalog with one of the managed service provider tokens.
This commit is contained in:
parent
901d6739ad
commit
fbb5c28c80
|
@ -113,6 +113,10 @@ func (t *Store) AgentToken() string {
|
|||
t.l.RLock()
|
||||
defer t.l.RUnlock()
|
||||
|
||||
if tok := t.enterpriseAgentToken(); tok != "" {
|
||||
return tok
|
||||
}
|
||||
|
||||
if t.agentToken != "" {
|
||||
return t.agentToken
|
||||
}
|
||||
|
|
|
@ -5,3 +5,8 @@ package token
|
|||
// Stub for enterpriseTokens
|
||||
type enterpriseTokens struct {
|
||||
}
|
||||
|
||||
// enterpriseAgentToken OSS stub
|
||||
func (s *Store) enterpriseAgentToken() string {
|
||||
return ""
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue