vault: github.com/hashicorp/vault/sdk/helper/consts Index | Files

package consts

import "github.com/hashicorp/vault/sdk/helper/consts"

Index

Package Files

agent.go consts.go error.go plugin_types.go replication.go

Constants

const (
    // ExpirationRestoreWorkerCount specifies the number of workers to use while
    // restoring leases into the expiration manager
    ExpirationRestoreWorkerCount = 64

    // NamespaceHeaderName is the header set to specify which namespace the
    // request is indented for.
    NamespaceHeaderName = "X-Vault-Namespace"

    // AuthHeaderName is the name of the header containing the token.
    AuthHeaderName = "X-Vault-Token"

    // RequestHeaderName is the name of the header used by the Agent for
    // SSRF protection.
    RequestHeaderName = "X-Vault-Request"

    // PerformanceReplicationALPN is the negotiated protocol used for
    // performance replication.
    PerformanceReplicationALPN = "replication_v1"

    // DRReplicationALPN is the negotiated protocol used for
    // dr replication.
    DRReplicationALPN = "replication_dr_v1"

    PerfStandbyALPN = "perf_standby_v1"

    RequestForwardingALPN = "req_fw_sb-act_v1"

    RaftStorageALPN = "raft_storage_v1"
)
const (
    //N.B. This needs to be excluded from replication despite the name; it's
    //merely saying that this is cluster information for the replicated
    //cluster.
    CoreReplicatedClusterPrefix   = "core/cluster/replicated/"
    CoreReplicatedClusterPrefixDR = "core/cluster/replicated-dr/"

    CoreReplicatedClusterInfoPath            = CoreReplicatedClusterPrefix + "info"
    CoreReplicatedClusterSecondariesPrefix   = CoreReplicatedClusterPrefix + "secondaries/"
    CoreReplicatedClusterInfoPathDR          = CoreReplicatedClusterPrefixDR + "info"
    CoreReplicatedClusterSecondariesPrefixDR = CoreReplicatedClusterPrefixDR + "secondaries/"

    // This is an identifier for the current secondary in the replicated paths
    // manager.  It should contain a character that is not allowed in secondary
    // ids to ensure it doesn't collide.
    CurrentReplicatedSecondaryIdentifier = ".current"
)
const AgentPathCacheClear = "/agent/v1/cache-clear"

AgentPathCacheClear is the path that the agent will use as its cache-clear endpoint.

Variables

var (
    // ErrSealed is returned if an operation is performed on a sealed barrier.
    // No operation is expected to succeed before unsealing
    ErrSealed = errors.New("Vault is sealed")

    // ErrStandby is returned if an operation is performed on a standby Vault.
    // No operation is expected to succeed until active.
    ErrStandby = errors.New("Vault is in standby mode")

    // ErrPathContainsParentReferences is returned when a path contains parent
    // references.
    ErrPathContainsParentReferences = errors.New("path cannot contain parent references")

    // ErrInvalidWrappingToken is returned when checking for the validity of
    // a wrapping token that turns out to be invalid.
    ErrInvalidWrappingToken = errors.New("wrapping token is not valid or does not exist")
)
var PluginTypes = []PluginType{
    PluginTypeUnknown,
    PluginTypeCredential,
    PluginTypeDatabase,
    PluginTypeSecrets,
}
var ReplicationStaleReadTimeout = 2 * time.Second

type PluginType Uses

type PluginType uint32
const (
    PluginTypeUnknown PluginType = iota
    PluginTypeCredential
    PluginTypeDatabase
    PluginTypeSecrets
)

This is a list of PluginTypes used by Vault. If we need to add any in the future, it would be best to add them to the _end_ of the list below because they resolve to incrementing numbers, which may be saved in state somewhere. Thus if the name for one of those numbers changed because a value were added to the middle, that could cause the wrong plugin types to be read from storage for a given underlying number. Example of the problem here: https://play.golang.org/p/YAaPw5ww3er

func ParsePluginType Uses

func ParsePluginType(pluginType string) (PluginType, error)

func (PluginType) String Uses

func (p PluginType) String() string

type ReplicationState Uses

type ReplicationState uint32
const (
    OldReplicationPrimary ReplicationState
    OldReplicationSecondary
    OldReplicationBootstrapping

    ReplicationUnknown            ReplicationState = 0
    ReplicationPerformancePrimary ReplicationState = 1 << iota // Note -- iota is 5 here!
    ReplicationPerformanceSecondary
    OldSplitReplicationBootstrapping
    ReplicationDRPrimary
    ReplicationDRSecondary
    ReplicationPerformanceBootstrapping
    ReplicationDRBootstrapping
    ReplicationPerformanceDisabled
    ReplicationDRDisabled
    ReplicationPerformanceStandby
)

func (*ReplicationState) AddState Uses

func (r *ReplicationState) AddState(flag ReplicationState)

func (*ReplicationState) ClearState Uses

func (r *ReplicationState) ClearState(flag ReplicationState)

func (ReplicationState) GetDRString Uses

func (r ReplicationState) GetDRString() string

func (ReplicationState) GetPerformanceString Uses

func (r ReplicationState) GetPerformanceString() string

func (ReplicationState) HasState Uses

func (r ReplicationState) HasState(flag ReplicationState) bool

func (ReplicationState) StateStrings Uses

func (r ReplicationState) StateStrings() []string

func (*ReplicationState) ToggleState Uses

func (r *ReplicationState) ToggleState(flag ReplicationState)

Package consts imports 3 packages (graph) and is imported by 45 packages. Updated 2019-10-14. Refresh now. Tools for package owners.