events

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsoleEventID

func NewConsoleEventID(context, namespace, console string, time time.Time) string

NewConsoleEventID creates a deterministic ID for consoles that can be used to correlate events.

Types

type CommonEvent

type CommonEvent struct {
	Version    string    `json:"apiVersion"`
	Kind       string    `json:"kind"`
	Event      string    `json:"event"`
	ObservedAt time.Time `json:"observed_at"`
	Id         string    `json:"id"`
}

func (CommonEvent) EventKind

func (e CommonEvent) EventKind() string

type ConsoleAttachEvent

type ConsoleAttachEvent struct {
	CommonEvent `json:",inline"`
	Spec        ConsoleAttachSpec `json:"spec"`
}

type ConsoleAttachSpec

type ConsoleAttachSpec struct {
	Username  string `json:"username"`
	Pod       string `json:"pod"`
	Container string `json:"container"`
}

type ConsoleAuthoriseEvent

type ConsoleAuthoriseEvent struct {
	CommonEvent `json:",inline"`
	Spec        ConsoleAuthoriseSpec `json:"spec"`
}

type ConsoleAuthoriseSpec

type ConsoleAuthoriseSpec struct {
	Username string `json:"username"`
}

type ConsoleRequestEvent

type ConsoleRequestEvent struct {
	CommonEvent `json:",inline"`
	Spec        ConsoleRequestSpec `json:"spec"`
}

type ConsoleRequestSpec

type ConsoleRequestSpec struct {
	Reason   string `json:"reason"`
	Username string `json:"username"`
	// Context is used to denote the cluster name,
	Context         string    `json:"context"`
	Namespace       string    `json:"namespace"`
	ConsoleTemplate string    `json:"console_template"`
	Console         string    `json:"console"`
	Timestamp       time.Time `json:"timestamp"`
}

type ConsoleStartEvent

type ConsoleStartEvent struct {
	CommonEvent `json:",inline"`
	Spec        ConsoleStartSpec `json:"spec"`
}

type ConsoleStartSpec

type ConsoleStartSpec struct {
	Job string `json:"job"`
}

type ConsoleTerminatedEvent

type ConsoleTerminatedEvent struct {
	CommonEvent `json:",inline"`
	Spec        ConsoleTerminatedSpec `json:"spec"`
}

type ConsoleTerminatedSpec

type ConsoleTerminatedSpec struct {
	TimedOut bool   `json:"timed_out"`
	ExitCode uint16 `json:"exit_code"`
}

Jump to

Keyboard shortcuts

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