events

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

LevelMap is a map of event type to Level

Functions

This section is empty.

Types

type Event

type Event struct {
	metaV1.TypeMeta

	Code      string
	Title     string
	Name      string
	Namespace string
	Messages  []string
	Type      config.EventType
	Reason    string
	Error     string
	Level     config.Level
	Cluster   string
	Channel   string
	TimeStamp time.Time
	Count     int32
	Action    string
	Skip      bool `json:",omitempty"`
	Resource  string
	Object    interface{} `json:"-"`

	Recommendations []string
	Warnings        []string
}

Event to store required information from k8s objects

func New

func New(objectMeta metaV1.ObjectMeta, object interface{}, eventType config.EventType, resource, clusterName string) (Event, error)

New extract required details from k8s object and returns new Event object

func (*Event) HasRecommendationsOrWarnings added in v0.13.0

func (e *Event) HasRecommendationsOrWarnings() bool

HasRecommendationsOrWarnings returns true if event has recommendations or warnings.

Jump to

Keyboard shortcuts

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