oom

package
v0.0.0-...-5343e98 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Observer

type Observer struct {
	ObservedOomsChannel chan OomInfo
}

Observer can observe pod resource update and collect OOM events.

func NewObserver

func NewObserver() Observer

NewObserver returns new instance of the Observer.

func (*Observer) OnAdd

func (*Observer) OnAdd(obj interface{})

OnAdd is Noop

func (*Observer) OnDelete

func (*Observer) OnDelete(obj interface{})

OnDelete is Noop

func (*Observer) OnUpdate

func (o *Observer) OnUpdate(oldObj, newObj interface{})

OnUpdate inspects if the update contains oom information and passess it to the ObservedOomsChannel

type OomInfo

type OomInfo struct {
	Timestamp                 time.Time
	MemoryRequest             resource.Quantity
	Namespace, Pod, Container string
}

OomInfo contains data of the OOM event occurrence

Jump to

Keyboard shortcuts

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