Documentation ¶
Overview ¶
Package watcher is a module that handles talking to the k8s api, and watching ConfigMaps for a set of configurations, and emitting them when they change.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrWatchChannelClosed = errors.New("watcher channel has closed")
ErrWatchChannelClosed should restart watcher
Functions ¶
func InjectionConfigsFromConfigMap ¶
func InjectionConfigsFromConfigMap(cm v1.ConfigMap) ([]*config.InjectionConfig, error)
InjectionConfigsFromConfigMap parse items in a configmap into a list of InjectionConfigs
Types ¶
type Config ¶
type Config struct { Namespace string ConfigMapLabels map[string]string MasterURL string Kubeconfig string }
Config is a configuration struct for the Watcher type
type K8sConfigMapWatcher ¶
type K8sConfigMapWatcher struct { Config // contains filtered or unexported fields }
K8sConfigMapWatcher is a struct that connects to the API and collects, parses, and emits sidecar configurations
func (*K8sConfigMapWatcher) Get ¶
func (c *K8sConfigMapWatcher) Get(ctx context.Context) (cfgs []*config.InjectionConfig, err error)
Get fetches all matching ConfigMaps
type Message ¶
type Message struct { Event Event InjectionConfig config.InjectionConfig }
Message is a message that describes a change and payload to a sidecar configuration
Click to show internal directories.
Click to hide internal directories.