handlers

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWorkspaceFailed   = errors.New("workspace is in a failure state")
	ErrWorkspaceDeletion = errors.New("workspace is currently being deleted")
)
View Source
var ErrResourceUnexpectedlyDeleted = errors.New("resource unexpectedly deleted")
View Source
var (
	ErrRunFailed = errors.New("run failed")
)
View Source
var PrematurelySucceededPodError = errors.New("pod prematurely succeeded")

Functions

func ContainerAttachable

func ContainerAttachable(pod, container string) watchtools.ConditionFunc

ContainerAttachable is an event handler that returns true if a pod container's TTY can be attached to, i.e. the container has started and is ready to handshake (therefore it should not have finished yet).

func ContainerReady

func ContainerReady(pod, container string, init, isTTY bool) watchtools.ConditionFunc

ContainerReady returns an appropriate event handler for determining when pod is ready for attaching to or streaming from.

func ContainerStreamable

func ContainerStreamable(pod, container string) watchtools.ConditionFunc

ContainerStreamable is an event handler that returns true if the pod Container's logs can be streamed, i.e. the container has at least started

func InitContainerAttachable

func InitContainerAttachable(pod, container string) watchtools.ConditionFunc

InitContainerAttachable is an event handler that returns true if a pod initContainer's TTY can be attached to, i.e. the init container has started and is ready to handshake (therefore it should not have finished yet).

func InitContainerStreamable

func InitContainerStreamable(pod, container string) watchtools.ConditionFunc

InitContainerStreamable is an event handler that returns true if the pod initContainer's logs can be streamed, i.e. the init container has at least started

func IsQueued

func IsQueued(runName string) watchtools.ConditionFunc

Return true if run is queued

func LogQueuePosition

func LogQueuePosition(runName string) watchtools.ConditionFunc

Log queue position until run is at front of queue

func PodHandlerWrapper

func PodHandlerWrapper(name string, h podHandler) watchtools.ConditionFunc

PodHandlerWrapper is a wrapper for creating handlers for pod events

func Reconciled added in v0.0.3

func Reconciled(obj reconcilable) watchtools.ConditionFunc

Handler that returns true when a resource has been reconciled. Reconciled here means it has been reconciled at least once. This handler is useful to determine if an operator is functioning.

func RunConnectable added in v0.0.7

func RunConnectable(name string, isTTY bool) watchtools.ConditionFunc

RunConnectable returns true if the run indicates its container can be connected to. If isTTY is true then the container must be running and must not have completed. If isTTY is false then the container can either be running or have completed (because its logs can be retrieved).

func WorkspaceReady added in v0.0.7

func WorkspaceReady() watchtools.ConditionFunc

WorkspaceReady returns true when a workspace's ready condition is true. An error is returned if the ready condition is false with a failure reason or it a deletion reason (its undergoing deletion). Any other reason returns false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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