Documentation ¶
Index ¶
- func Alertmanagers(kubeconfig string) (monitoringv1typed.AlertmanagerInterface, error)
- func MatchLabel(key, value string) (labels.Selector, error)
- func NewMonitoringClient(kubeconfig string) (*monitoring.Clientset, error)
- func Prometheuses(kubeconfig string) (monitoringv1typed.PrometheusInterface, error)
- type Client
- type ConfigMap
- type ConfigMapUpdate
- type Label
- type ResourceUpdate
- type Secret
- type SecretUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Alertmanagers ¶
func Alertmanagers(kubeconfig string) (monitoringv1typed.AlertmanagerInterface, error)
Alertmanagers returns Alertmanager CRD client in monitoring namespace.
func MatchLabel ¶
MatchLabel matches a resource with the specified label
func NewMonitoringClient ¶
func NewMonitoringClient(kubeconfig string) (*monitoring.Clientset, error)
NewMonitoringClient returns a new in-cluster Prometheus CRD API client.
func Prometheuses ¶
func Prometheuses(kubeconfig string) (monitoringv1typed.PrometheusInterface, error)
Prometheuses returns Prometheus CRD client in monitoring namespace.
Types ¶
type Client ¶
type Client struct {
*kubernetes.Clientset
}
Client is the Kubernetes API client
func (*Client) WatchConfigMaps ¶
WatchConfigMaps watches Kubernetes API for ConfigMaps using specified configs to match and send updates
type ConfigMap ¶
type ConfigMap struct { // Selector specifies the selector for this ConfigMap Selector labels.Selector // RecvCh specifies the channel that receives updates on the matched resource RecvCh chan ConfigMapUpdate }
ConfigMap describes matching and sending updates for ConfigMaps. If Match matches a resource, RecvCh channel receives the data from the matched resource
type ConfigMapUpdate ¶
type ConfigMapUpdate struct { // ResourceUpdate describes the common resource update metadata ResourceUpdate // Data descrines the update data payload Data map[string]string }
ConfigMapUpdate describes a ConfigMap update
type ResourceUpdate ¶
type ResourceUpdate struct { // EventType specifies the type of event watch.EventType // TypeMeta references the resource type metadata metav1.TypeMeta // ObjectMeta references the resource metadata metav1.ObjectMeta }
ResourceUpdate describes an update for a resource
func (ResourceUpdate) Meta ¶
func (r ResourceUpdate) Meta() string
Meta formats the metadata for readability
func (ResourceUpdate) String ¶
func (r ResourceUpdate) String() string
String formats this update for readability
type Secret ¶
type Secret struct { // Selector specifies the selector for this Secret Selector labels.Selector // RecvCh specifies the channel that receives updates on the matched resource RecvCh chan SecretUpdate }
Secret describes matching and sending updates for Secrets. If Match matches a resource, RecvCh channel receives the data from the matched resource
type SecretUpdate ¶
type SecretUpdate struct { // ResourceUpdate describes the common resource update metadata ResourceUpdate // Data descrines the update data payload Data map[string][]byte }
SecretUpdate describes a Secret update