Documentation ¶
Index ¶
- func GetCurrentConfig() *types.ConfigFile
- func ReadAndStoreConfig(fsys fs.FS, path string) error
- func ReadConfigFromFS(fsys fs.FS, path string) (*types.ConfigFile, error)
- func StoreConfig(cfg *types.ConfigFile)
- func StoreCurrentSource(source *SpiffeConnectorSource)
- type DynamicSource
- type SpiffeConnectorSource
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentConfig ¶
func GetCurrentConfig() *types.ConfigFile
func ReadConfigFromFS ¶
func StoreConfig ¶
func StoreConfig(cfg *types.ConfigFile)
func StoreCurrentSource ¶
func StoreCurrentSource(source *SpiffeConnectorSource)
Types ¶
type DynamicSource ¶
type DynamicSource struct{}
DynamicSource represents the most up-to-date SVID / Trust bundle we have from the most recently loaded source config file
var (
CurrentSource DynamicSource
)
func (DynamicSource) GetX509BundleForTrustDomain ¶
func (d DynamicSource) GetX509BundleForTrustDomain(trustDomain spiffeid.TrustDomain) (*x509bundle.Bundle, error)
func (DynamicSource) GetX509SVID ¶
func (d DynamicSource) GetX509SVID() (*x509svid.SVID, error)
type SpiffeConnectorSource ¶
type SpiffeConnectorSource struct {
// contains filtered or unexported fields
}
SpiffeConnectorSource implements x509svid.Source and x509bundle.Source by either reading files or communicating with the SPIRE workload API.
func ConstructSpiffeConnectorSource ¶
func ConstructSpiffeConnectorSource(ctx context.Context, cancel context.CancelFunc, config *types.SpiffeConfig) (*SpiffeConnectorSource, error)
ConstructSpiffeConnectorSource constructs a new SPIFFE Connector source ready to become the current source. When disposing of the source be sure to cancel the Context, as this will clean up the fsnotify watchers.
func GetCurrentSource ¶
func GetCurrentSource() *SpiffeConnectorSource
func (*SpiffeConnectorSource) Cancel ¶
func (s *SpiffeConnectorSource) Cancel()
func (*SpiffeConnectorSource) GetX509BundleForTrustDomain ¶
func (s *SpiffeConnectorSource) GetX509BundleForTrustDomain(trustDomain spiffeid.TrustDomain) (*x509bundle.Bundle, error)
func (*SpiffeConnectorSource) GetX509SVID ¶
func (s *SpiffeConnectorSource) GetX509SVID() (*x509svid.SVID, error)
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher is an opinionated fsnotify.Watcher that is designed to watch Kubernetes config maps and perform actions on change.
func NewWatcher ¶
Click to show internal directories.
Click to hide internal directories.