event

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FailedReasonPartials = []string{"failed", "err", "exceeded", "invalid", "unhealthy",
	"mismatch", "insufficient", "conflict", "outof", "nil"}

FailedReasonPartials is an array of partial strings to correctly filter warning events. Have to be lower case for correct case insensitive comparison. Based on k8s official events reason file: https://github.com/kubernetes/kubernetes/blob/53f0f9d59860131c2be301a0054adfc86e43945d/pkg/kubelet/container/event.go Partial strings that are not in event.go file are added in order to support older versions of k8s which contained additional event reason messages.

Functions

func CreateEventList added in v1.1.1

func CreateEventList(events []api.Event, dsQuery *dataselect.DataSelectQuery) common.EventList

CreateEventList converts array of api events to common EventList structure

func FillEventsType

func FillEventsType(events []api.Event) []api.Event

Based on event Reason fills event Type in order to allow correct filtering by Type.

func GetEvents

func GetEvents(client client.Interface, namespace, resourceName string) ([]api.Event, error)

GetEvents gets events associated to resource with given name.

func GetNamespaceEvents added in v1.1.1

func GetNamespaceEvents(client client.Interface, dsQuery *dataselect.DataSelectQuery, namespace string) (common.EventList, error)

GetNodeEvents gets events associated to node with given name.

func GetNodeEvents

func GetNodeEvents(client client.Interface, dsQuery *dataselect.DataSelectQuery, nodeName string) (*common.EventList, error)

GetNodeEvents gets events associated to node with given name.

func GetPodsEventWarnings

func GetPodsEventWarnings(events []api.Event, pods []api.Pod) []common.Event

GetPodsEventWarnings returns warning pod events by filtering out events targeting only given pods TODO(floreks) : Import and use Set instead of custom function to get rid of duplicates

func GetPodsEvents

func GetPodsEvents(client client.Interface, namespace string, resourceSelector map[string]string) (
	[]api.Event, error)

GetPodsEvents gets pods events associated to resource targeted by given resource selector.

func IsTypeFilled

func IsTypeFilled(events []api.Event) bool

IsTypeFilled returns true if all given events type is filled, false otherwise. This is needed as some older versions of kubernetes do not have Type property filled.

func ToEvent added in v1.1.1

func ToEvent(event api.Event) common.Event

ToEvent converts event api Event to Event model object.

Types

type EventCell added in v1.4.0

type EventCell api.Event

func (EventCell) GetProperty added in v1.4.0

Jump to

Keyboard shortcuts

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