Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamX509SVID ¶
func StreamX509SVID(ctx context.Context, config *X509ClientConfig, out chan<- *workload.X509SVIDResponse) error
Types ¶
type X509Client ¶
type X509Client interface {
Start() error
Stop()
CurrentSVID() (*workload.X509SVIDResponse, error)
UpdateChan() <-chan *workload.X509SVIDResponse
}
func NewX509Client ¶
func NewX509Client(c *X509ClientConfig) X509Client
NewX509Client creates a new Workload API client for the X509SVID service.
type X509ClientConfig ¶
type X509ClientConfig struct {
// SPIFFE Workload Endpoint address. Will be read from the
// `SPIFFE_ENDPOINT_SOCKET` env var if not set.
Addr net.Addr
// When true, the client will not attempt to reconnect on error
FailOnError bool
// The maximum time to wait before bailing if the workload API is failing.
// Defaults to 5 minutes if unset. Set to a negative value to disable (in
// which case the only way to return from Start() is via a call to stop.
Timeout time.Duration
// The maximum backoff value between retries. Defaults to 30 seconds.
BackoffCap time.Duration
// A logging interface which is satisfied by stdlib logger. Can be nil.
Log logrus.StdLogger
// Clock interface used for backoff timing. Can be nil.
Clock clock.Clock
}
Click to show internal directories.
Click to hide internal directories.