event

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Namespace string `json:"namespace"`
	Kind      string `json:"kind"`
	Component string `json:"component"`
	Host      string `json:"host"`
	Reason    string `json:"reason"`
	Status    string `json:"status"`
	Name      string `json:"name"`

	ResourceRevision  string    `json:"resourceRevision"`
	CreationTimeStamp v1.Time   `json:"creationTimeStamp"`
	UID               types.UID `json:"uid"`
	PipelineName      string    `json:"pipelineName"`
	ReleaseVersion    string    `json:"releaseVersion"`
	Gen               string    `json:"gen"`
	// contains filtered or unexported fields
}

Event represent an event got from k8s api server Events from different endpoints need to be casted to KubewatchEvent before being able to be handled by handler

func New

func New(obj interface{}, action string) Event

New create new KubewatchEvent

func (*Event) Message

func (e *Event) Message() (msg string)

Message returns event message in standard format. included as a part of event packege to enhance code resuablity across handlers.

type EventMetaData

type EventMetaData struct {
	Kind              string    `json:"kind"`
	Name              string    `json:"name"`
	NameSpace         string    `json:"nameSpace"`
	ResourceVersion   string    `json:"resourceVersion"`
	CreationTimeStamp v1.Time   `json:"creationTimeStamp"`
	SourceComponent   string    `json:"sourceComponent"`
	Reason            string    `json:"reason"`
	Message           string    `json:"message"`
	UID               types.UID `json:"uid"`
	PipelineName      string    `json:"pipelineName"`
	ReleaseVersion    string    `json:"releaseVersion"`
	Gen               string    `json:"gen"`
}

Jump to

Keyboard shortcuts

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