Documentation ¶
Index ¶
- type Args
- type Option
- func WithContainerImage(o string) Option
- func WithContainerOpts(o ...containerd.NewContainerOpts) Option
- func WithContainerdAddress(a string) Option
- func WithEnv(o []string) Option
- func WithGracefulShutdownTimeout(timeout time.Duration) Option
- func WithLoggingManager(manager runtime.LoggingManager) Option
- func WithNamespace(o string) Option
- func WithOCISpecOpts(o ...oci.SpecOpts) Option
- type Options
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
Option is the functional option func.
func WithContainerImage ¶
WithContainerImage sets the image ref.
func WithContainerOpts ¶
func WithContainerOpts(o ...containerd.NewContainerOpts) Option
WithContainerOpts sets the containerd container options.
func WithContainerdAddress ¶
WithContainerdAddress sets the containerd socket path.
func WithGracefulShutdownTimeout ¶
WithGracefulShutdownTimeout sets the timeout for the task to terminate before sending SIGKILL.
func WithLoggingManager ¶ added in v0.6.0
func WithLoggingManager(manager runtime.LoggingManager) Option
WithLoggingManager sets the LoggingManager option.
func WithOCISpecOpts ¶
WithOCISpecOpts sets the OCI spec options.
type Options ¶
type Options struct { // LoggingManager provides service log handling. LoggingManager runtime.LoggingManager // Env describes the service's environment variables. Elements should be in // the format <key=<value> Env []string // ContainerdAddress is containerd socket address. ContainerdAddress string // ContainerOpts describes the container options. ContainerOpts []containerd.NewContainerOpts // OCISpecOpts describes the OCI spec options. OCISpecOpts []oci.SpecOpts // ContainerImage is the container's image. ContainerImage string // Namespace is the containerd namespace. Namespace string // GracefulShutdownTimeout is the time to wait for process to exit after SIGTERM // before sending SIGKILL GracefulShutdownTimeout time.Duration }
Options is the functional options struct.
func DefaultOptions ¶
func DefaultOptions() *Options
DefaultOptions describes the default options to a runner.
Click to show internal directories.
Click to hide internal directories.