Documentation
¶
Index ¶
Constants ¶
View Source
const ( FormatJSONStream = "json-stream" FormatSummaryStream = "summary-stream" FormatEventLog = "event-log" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleWatcher ¶
type BundleWatcher struct {
WorkloadAPISocket string
Format string
BundleType string // "x509" or "jwt"
Output io.Writer
}
BundleWatcher streams bundle updates from the Workload API.
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter writes watch events to an output stream in the configured format.
func NewFormatter ¶
NewFormatter creates a Formatter for the given format name.
func (*Formatter) Emit ¶
func (f *Formatter) Emit(event WatchEvent)
Emit writes a single event to the output. If Timestamp is empty it is set to now.
type JWTSVIDWatcher ¶
type JWTSVIDWatcher struct {
WorkloadAPISocket string
Audiences []string
Format string
Interval time.Duration
Output io.Writer
}
JWTSVIDWatcher periodically fetches JWT SVIDs and emits events. The Workload API does not stream JWT SVIDs; this watcher re-fetches at a configurable interval.
type WatchEvent ¶
type WatchEvent struct {
Timestamp string `json:"timestamp"`
Event string `json:"event"`
SpiffeID string `json:"spiffe_id,omitempty"`
Expiry string `json:"expiry,omitempty"`
TrustDomain string `json:"trust_domain,omitempty"`
KeyCount int `json:"key_count,omitempty"`
Error string `json:"error,omitempty"`
}
WatchEvent represents a single event emitted during a watch operation.
type X509SVIDWatcher ¶
X509SVIDWatcher streams X.509 SVID updates from the Workload API.
Click to show internal directories.
Click to hide internal directories.