spire

package
v1.14.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 16 Imported by: 7

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEntry

func AddEntry(ctx context.Context, parentID, spiffeID, selector, federatesWith string) error

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

func PeerSpiffeIDFromContext(ctx context.Context) (spiffeid.ID, error)

PeerSpiffeIDFromContext - returns spiffe ID of the service from the peer context

func Start

func Start(options ...Option) <-chan error

Start - start a spire-server and spire-agent with the given agentId

Types

type Option

type Option func(*option)

Option for spire

func WithAgentConfig added in v1.4.0

func WithAgentConfig(conf string) Option

WithAgentConfig - adds agent config

func WithAgentID

func WithAgentID(agentID string) Option

WithAgentID - agentID for starting spire

func WithContext

func WithContext(ctx context.Context) Option

WithContext - use ctx as context for starting spire

func WithEntry

func WithEntry(spiffeID, selector string) Option

WithEntry - Option to add Entry to spire-server. May be used multiple times.

func WithFederatedEntry added in v1.4.0

func WithFederatedEntry(spiffeID, selector, federatesWith string) Option

WithFederatedEntry - Option to add federated Entry to spire-server. May be used multiple times.

func WithRoot added in v1.4.0

func WithRoot(root string) Option

WithRoot - sets root folder

func WithServerConfig added in v1.4.0

func WithServerConfig(conf string) Option

WithServerConfig - adds server config

Jump to

Keyboard shortcuts

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