Documentation ¶
Overview ¶
Package spire provides two simple functions:
- Start to start a SpireServer/SpireAgent for local testing
- AddEntry to add entries into the spire server
Index ¶
- func AddEntry(ctx context.Context, parentID, spiffeID, selector, federatesWith string) error
- func PeerSpiffeIDFromContext(ctx context.Context) (spiffeid.ID, error)
- func Start(options ...Option) <-chan error
- type Option
- func WithAgentConfig(conf string) Option
- func WithAgentID(agentID string) Option
- func WithContext(ctx context.Context) Option
- func WithEntry(spiffeID, selector string) Option
- func WithFederatedEntry(spiffeID, selector, federatesWith string) Option
- func WithRoot(root string) Option
- func WithServerConfig(conf string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEntry ¶
AddEntry - adds an entry to the spire server for parentID, spiffeID, and selector
parentID is usually the same as the agentID provided to Start()
func PeerSpiffeIDFromContext ¶ added in v1.7.0
PeerSpiffeIDFromContext - returns spiffe ID of the service from the peer context
Types ¶
type Option ¶
type Option func(*option)
Option for spire
func WithAgentConfig ¶ added in v1.4.0
WithAgentConfig - adds agent config
func WithContext ¶
WithContext - use ctx as context for starting spire
func WithFederatedEntry ¶ added in v1.4.0
WithFederatedEntry - Option to add federated Entry to spire-server. May be used multiple times.
func WithServerConfig ¶ added in v1.4.0
WithServerConfig - adds server config
Click to show internal directories.
Click to hide internal directories.