token

package
v1.0.0-beta2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2017 License: MPL-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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) ACLReplicationToken

func (t *Store) ACLReplicationToken() string

ACLReplicationToken returns the ACL replication token.

func (*Store) AgentToken

func (t *Store) AgentToken() string

AgentToken returns the best token to use for internal agent operations.

func (*Store) IsAgentMasterToken

func (t *Store) IsAgentMasterToken(token string) bool

IsAgentMasterToken checks to see if a given token is the agent master token. This will never match an empty token for safety.

func (*Store) UpdateACLReplicationToken

func (t *Store) UpdateACLReplicationToken(token string)

UpdateACLReplicationToken replaces the current ACL replication token in the store.

func (*Store) UpdateAgentMasterToken

func (t *Store) UpdateAgentMasterToken(token string)

UpdateAgentMasterToken replaces the current agent master token in the store.

func (*Store) UpdateAgentToken

func (t *Store) UpdateAgentToken(token string)

UpdateAgentToken replaces the current agent token in the store.

func (*Store) UpdateUserToken

func (t *Store) UpdateUserToken(token string)

UpdateUserToken replaces the current user token in the store.

func (*Store) UserToken

func (t *Store) UserToken() string

UserToken returns the best token to use for user operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL