event

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: Apache-2.0 Imports: 15 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) LimitedListAllNamespace

func (e *Event) LimitedListAllNamespace(limit int, cont *string) (*apiv1.EventList, *string, error)

LimitedListAllNamespace limit list event all namespaces

func (*Event) ListByNamespace

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

ListByNamespace list event by namespace

func (*Event) WatchPodEventsAllNamespaces

func (e *Event) WatchPodEventsAllNamespaces(ctx context.Context, callback func(*apiv1.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 WithCompleteParams

func WithCompleteParams(addr string, client *httpclient.HTTPClient) Option

WithCompleteParams provides an Option

func WithKubernetesClient

func WithKubernetesClient(client *kubernetes.Clientset) Option

Jump to

Keyboard shortcuts

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