event

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Overview

Package event manipulates the k8s api of event object

Package event manipulates the k8s api of event object

Package event manipulates the k8s api of event object

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

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

Event is the object to encapsulate docker

func New

func New(options ...Option) *Event

New news an Event

func (*Event) AnalyzePodEvents

func (e *Event) AnalyzePodEvents(namespace, name string) (MessageList, error)

AnalyzePodEvents Analyze pod events and turn them into interpretable content

func (*Event) ListByNamespace

func (e *Event) ListByNamespace(namespace string) (*corev1.EventList, error)

ListByNamespace list event by namespace

func (*Event) WatchHPAEventsAllNamespaces

func (e *Event) WatchHPAEventsAllNamespaces(ctx context.Context, callback func(*corev1.Event)) error

func (*Event) WatchPodEventsAllNamespaces

func (e *Event) WatchPodEventsAllNamespaces(ctx context.Context, callback func(*corev1.Event)) error

type Message

type Message struct {
	Timestamp int64
	Reason    string
	Message   string
	Comment   string
}

Message Event message

type MessageList

type MessageList []Message

MessageList 事件消息列表

func (MessageList) Len

func (em MessageList) Len() int

func (MessageList) Less

func (em MessageList) Less(i, j int) bool

func (MessageList) Swap

func (em MessageList) Swap(i, j int)

type Option

type Option func(*Event)

Option configures an Event

func WithKubernetesClient

func WithKubernetesClient(client kubernetes.Interface) Option

Jump to

Keyboard shortcuts

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