Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cell = cell.Module( "spire-client", "Spire Server API Client", cell.Config(ClientConfig{}), cell.Provide(NewClient), )
Cell is the cell for the SPIRE client.
View Source
var FakeCellClient = cell.Module( "fake-spire-client", "Fake Spire Server API Client", cell.Config(ClientConfig{}), cell.Provide(NewFakeClient), )
Functions ¶
func NewClient ¶
func NewClient(params params, lc cell.Lifecycle, cfg ClientConfig, log logrus.FieldLogger) identity.Provider
NewClient creates a new SPIRE client. If the mutual authentication is not enabled, it returns a noop client.
func NewFakeClient ¶
NewFakeClient creates a new fake SPIRE client.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type ClientConfig ¶
type ClientConfig struct { MutualAuthEnabled bool `mapstructure:"mesh-auth-mutual-enabled"` SpireAgentSocketPath string `mapstructure:"mesh-auth-spire-agent-socket"` SpireServerAddress string `mapstructure:"mesh-auth-spire-server-address"` SpireServerConnectionTimeout time.Duration `mapstructure:"mesh-auth-spire-server-connection-timeout"` SpiffeTrustDomain string `mapstructure:"mesh-auth-spiffe-trust-domain"` }
ClientConfig contains the configuration for the SPIRE client.
func (ClientConfig) Flags ¶
func (cfg ClientConfig) Flags(flags *pflag.FlagSet)
Flags adds the flags used by ClientConfig.
Click to show internal directories.
Click to hide internal directories.