event

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: AGPL-3.0 Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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