event

package
v6.0.0-alpha2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(base mb.BaseMetricSet) (mb.MetricSet, error)

New create a new instance of the MetricSet Part of new is also setting up the configuration by processing additional configuration entries if needed.

Types

type Enabled

type Enabled struct {
	Enabled bool `config:"enabled"`
}

type Event

type Event struct {
	APIVersion     string    `json:"apiVersion"`
	Count          int64     `json:"count"`
	FirstTimestamp time.Time `json:"firstTimestamp"`
	InvolvedObject struct {
		APIVersion      string `json:"apiVersion"`
		Kind            string `json:"kind"`
		Name            string `json:"name"`
		ResourceVersion string `json:"resourceVersion"`
		UID             string `json:"uid"`
	} `json:"involvedObject"`
	Kind          string     `json:"kind"`
	LastTimestamp time.Time  `json:"lastTimestamp"`
	Message       string     `json:"message"`
	Metadata      ObjectMeta `json:"metadata"`
	Reason        string     `json:"reason"`
	Source        struct {
		Component string `json:"component"`
		Host      string `json:"host"`
	} `json:"source"`
	Type string `json:"type"`
}

type MetricSet

type MetricSet struct {
	mb.BaseMetricSet
	// contains filtered or unexported fields
}

MetricSet type defines all fields of the MetricSet The event MetricSet listens to events from Kubernetes API server and streams them to the output. MetricSet implements the mb.PushMetricSet interface, and therefore does not rely on polling.

func (*MetricSet) Run

func (m *MetricSet) Run(reporter mb.PushReporter)

Run method provides the Kubernetes event watcher with a reporter with which events can be reported.

type ObjectMeta

type ObjectMeta struct {
	Annotations       map[string]string `json:"annotations"`
	CreationTimestamp string            `json:"creationTimestamp"`
	DeletionTimestamp string            `json:"deletionTimestamp"`
	GenerateName      string            `json:"generateName"`
	Labels            map[string]string `json:"labels"`
	Name              string            `json:"name"`
	Namespace         string            `json:"namespace"`
	OwnerReferences   []struct {
		APIVersion string `json:"apiVersion"`
		Controller bool   `json:"controller"`
		Kind       string `json:"kind"`
		Name       string `json:"name"`
		UID        string `json:"uid"`
	} `json:"ownerReferences"`
	ResourceVersion string `json:"resourceVersion"`
	SelfLink        string `json:"selfLink"`
	UID             string `json:"uid"`
}

type PluginConfig

type PluginConfig []map[string]common.Config

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

Watcher is a controller that synchronizes Pods.

func NewWatcher

func NewWatcher(kubeClient *k8s.Client, syncPeriod time.Duration, namespace string) *Watcher

NewWatcher initializes the watcher client to provide a local state of pods from the cluster (filtered to the given host)

func (*Watcher) Run

func (w *Watcher) Run()

func (*Watcher) Stop

func (w *Watcher) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL