Documentation ¶
Index ¶
- type Store
- func (t *Store) AgentMasterToken() string
- func (t *Store) AgentMasterTokenAndSource() (string, TokenSource)
- func (t *Store) AgentToken() string
- func (t *Store) AgentTokenAndSource() (string, TokenSource)
- func (t *Store) IsAgentMasterToken(token string) bool
- func (t *Store) ReplicationToken() string
- func (t *Store) ReplicationTokenAndSource() (string, TokenSource)
- func (t *Store) UpdateAgentMasterToken(token string, source TokenSource)
- func (t *Store) UpdateAgentToken(token string, source TokenSource)
- func (t *Store) UpdateReplicationToken(token string, source TokenSource)
- func (t *Store) UpdateUserToken(token string, source TokenSource)
- func (t *Store) UserToken() string
- func (t *Store) UserTokenAndSource() (string, TokenSource)
- type TokenSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is used to hold the special ACL tokens used by Consul agents. It is designed to update the tokens on the fly, so the token store itself should be plumbed around and used to get tokens at runtime, don't save the resulting tokens.
func (*Store) AgentMasterToken ¶ added in v1.4.3
func (*Store) AgentMasterTokenAndSource ¶ added in v1.4.3
func (t *Store) AgentMasterTokenAndSource() (string, TokenSource)
func (*Store) AgentToken ¶
AgentToken returns the best token to use for internal agent operations.
func (*Store) AgentTokenAndSource ¶ added in v1.4.3
func (t *Store) AgentTokenAndSource() (string, TokenSource)
AgentToken returns the best token to use for internal agent operations.
func (*Store) IsAgentMasterToken ¶
IsAgentMasterToken checks to see if a given token is the agent master token. This will never match an empty token for safety.
func (*Store) ReplicationToken ¶ added in v1.4.3
ReplicationToken returns the replication token.
func (*Store) ReplicationTokenAndSource ¶ added in v1.4.3
func (t *Store) ReplicationTokenAndSource() (string, TokenSource)
ReplicationToken returns the replication token.
func (*Store) UpdateAgentMasterToken ¶
func (t *Store) UpdateAgentMasterToken(token string, source TokenSource)
UpdateAgentMasterToken replaces the current agent master token in the store.
func (*Store) UpdateAgentToken ¶
func (t *Store) UpdateAgentToken(token string, source TokenSource)
UpdateAgentToken replaces the current agent token in the store.
func (*Store) UpdateReplicationToken ¶ added in v1.4.3
func (t *Store) UpdateReplicationToken(token string, source TokenSource)
UpdateReplicationToken replaces the current replication token in the store.
func (*Store) UpdateUserToken ¶
func (t *Store) UpdateUserToken(token string, source TokenSource)
UpdateUserToken replaces the current user token in the store.
func (*Store) UserTokenAndSource ¶ added in v1.4.3
func (t *Store) UserTokenAndSource() (string, TokenSource)
UserToken returns the best token to use for user operations.
type TokenSource ¶ added in v1.4.3
type TokenSource bool
const ( TokenSourceConfig TokenSource = false TokenSourceAPI TokenSource = true )