Documentation ¶
Overview ¶
Package helpers offers functions to simplify dealing with kubernetes resources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Helpers ¶
type Helpers interface { JobHelper PodHelper ServiceHelper }
Helpers offers Helper functions grouped by the objects they handle
type JobHelper ¶ added in v0.4.0
type JobHelper interface { // WaitJobCompleted waits for the Job to be completed for up to the given timeout (in seconds) and returns // a boolean indicating if the status was reached. If the job is Failed an error is returned. WaitJobCompleted(name string, timeout uint) (bool, error) }
JobHelper defines helper functions for manipulating Jobs
type PodExecOptions ¶ added in v0.4.0
type PodExecOptions struct { Pod string // name of the Pod to execute the command in Container string // name of the container to execute the command in Command []string // command to be executed with its parameters Stdin []byte // stdin to be supplied to the command Timeout uint // number of seconds allowed to wait for completion }
PodExecOptions describe the command to be executed and the target container
type PodExecResult ¶ added in v0.4.0
PodExecResult contains the output obtained from the execution of a command
type PodHelper ¶
type PodHelper interface { // ExecuteInPod executes a non-interactive command described in options and returns the stdout and stderr outputs ExecuteInPod(options PodExecOptions) (*PodExecResult, error) // WaitPodRunning waits for the Pod to be running for up to given timeout (in seconds) and returns // a boolean indicating if the status was reached. If the pod is Failed returns error. WaitPodRunning(name string, timeout uint) (bool, error) }
PodHelper defines helper functions for manipulating Pods
type ServiceHelper ¶
type ServiceHelper interface { // WaitServiceReady waits for the given service to have at least one endpoint available // or the timeout (in seconds) expires. It returns a boolean indicating if the service is ready WaitServiceReady(service string, timeout uint) (bool, error) // GetExternalIP returns one external ip for the given service. If none is assigned after the timeout // expires, returns an empty address "". GetExternalIP(service string, timeout uint) (string, error) }
ServiceHelper implements functions for dealing with services
Click to show internal directories.
Click to hide internal directories.