container

package module
v0.0.0-...-5fa6b44 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

README

container

GoDoc

Types

type ContainerImageMissingErr

type ContainerImageMissingErr struct{ ... }

ContainerImageMissingErr is returned when the ExecutionContext passed to NewContainerProcess doesn't contain tke key "image"

To fix this, ensure that a container image is set

func (ContainerImageMissingErr) Error

func (e ContainerImageMissingErr) Error() string

Error implements the error interface and returns a contextual message

This error, while simple and (at least on the face of it) an over-engineered version of fmt.Errorf("container image missing"), is verbosely implemented so that callers may use errors.Is(err, orchestrator.ContainerImageMissingErr) to handle error cases better

type ContainerNonZeroExit

type ContainerNonZeroExit int64

ContainerNonZeroExit is returned when the container exists with anything other than exit code 0

Container logs should shed light on what went wrong

func (ContainerNonZeroExit) Error

func (e ContainerNonZeroExit) Error() string

Error returns the error message associated with this error

type ContainerProcess

type ContainerProcess struct { ... }

ContainerProcess allows for processes to be run via a container

func (ContainerProcess) ID

func (c ContainerProcess) ID() string

ID returns a unique ID for a process manager

func (ContainerProcess) Run

func (c ContainerProcess) Run(ctx context.Context, e orchestrator.Event) (ps orchestrator.ProcessStatus, err error)

Run takes an Event, and passes it to a container to run


Readme created from Go doc with goreadme

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageMissingErr

type ImageMissingErr struct{}

ImageMissingErr is returned when the ExecutionContext passed to NewContainerProcess doesn't contain tke key "image"

To fix this, ensure that a container image is set

func (ImageMissingErr) Error

func (e ImageMissingErr) Error() string

Error implements the error interface and returns a contextual message

This error, while simple and (at least on the face of it) an over-engineered version of fmt.Errorf("container image missing"), is verbosely implemented so that callers may use errors.Is(err, orchestrator.ContainerImageMissingErr) to handle error cases better

type NonZeroExit

type NonZeroExit int64

NonZeroExit is returned when the container exists with anything other than exit code 0

Container logs should shed light on what went wrong

func (NonZeroExit) Error

func (e NonZeroExit) Error() string

Error returns the error message associated with this error

type Process

type Process struct {
	// contains filtered or unexported fields
}

Process allows for processes to be run via a container

func New

func New(conf orchestrator.ProcessConfig) (c Process, err error)

New connects to a container socket, and returns a ContainerProcess which can be then used to run jobs

func (Process) ID

func (c Process) ID() string

ID returns a unique ID for a process manager

func (Process) Run

func (c Process) Run(ctx context.Context, e orchestrator.Event) (ps orchestrator.ProcessStatus, err error)

Run takes an Event, and passes it to a container to run

Jump to

Keyboard shortcuts

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