monitoring

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventReasonNodeIpUpdate   = "NodeIpUpdate"
	EventReasonNodePortUpdate = "NodePortUpdate"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Object            runtime.Object
	RelatedObject     runtime.Object
	EventType         EventType
	Reason            string
	Message           string
	Action            string
	ReportingInstance string
}

type EventRecorder

type EventRecorder struct {
	Client    client.Client
	Logger    *zap.SugaredLogger
	Scheme    *runtime.Scheme
	Version   string
	Cluster   string
	Tenant    string
	Slice     string
	Namespace string
	Component string
}

func (*EventRecorder) Copy

func (er *EventRecorder) Copy() *EventRecorder

func (*EventRecorder) RecordEvent

func (er *EventRecorder) RecordEvent(ctx context.Context, e *Event) error

RecordEvent raises a new event with the given fields TODO: events caching and aggregation

func (*EventRecorder) WithNamespace

func (er *EventRecorder) WithNamespace(ns string) *EventRecorder

WithNamespace returns a new recorder with added namespace name If namespace is not provided, recorder will use the object namespace

func (*EventRecorder) WithSlice

func (er *EventRecorder) WithSlice(slice string) *EventRecorder

WithSlice returns a new recorder with added slice name for raising events

type EventType

type EventType string
var (
	EventTypeWarning EventType = "Warning"
	EventTypeNormal  EventType = "Normal"
)

Jump to

Keyboard shortcuts

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