container

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildOption

type BuildOption func(*buildOptions)

BuildOption sets options for build operations.

func WithBuildNoop

func WithBuildNoop() BuildOption

WithBuildNoop sets build to be a noop when image exists.

type CmdServiceOption

type CmdServiceOption func(*cmdService)

CmdServiceOption sets options to the service.

func WithCmdServiceConfigDir

func WithCmdServiceConfigDir(path string) CmdServiceOption

WithCmdServiceConfigDir sets the configuration directory for the service.

func WithCmdServiceUser

func WithCmdServiceUser(user string) CmdServiceOption

WithCmdServiceUser sets the user for the service.

func WithCmdServiceVersion

func WithCmdServiceVersion(version string) CmdServiceOption

WithCmdServiceVersion sets the version of cmdproxy to the service.

func WithCmdServiceWorkspaceRoot

func WithCmdServiceWorkspaceRoot(root string) CmdServiceOption

WithCmdServiceWorkspaceRoot sets the workspace root for the service.

type RunOption

type RunOption func(*runOptions)

RunOption sets options for run operations.

func WithRunBuild

func WithRunBuild() RunOption

WithRunBuild sets run opertation to build if image does not exist.

func WithRunDetach

func WithRunDetach() RunOption

WithRunDetach sets the run operation to detach from the container.

func WithRunEnv

func WithRunEnv(env map[string]string) RunOption

WithRunEnv sets environment variables to the container.

func WithRunImage

func WithRunImage(image string) RunOption

WithRunImage sets the image for the container.

func WithRunName

func WithRunName(name string) RunOption

WithRunName sets the name for the container.

func WithRunVolumes

func WithRunVolumes(volumes map[string]string) RunOption

WithRunVolumes sets volumes to the container.

func WithRunWorkspace

func WithRunWorkspace(workspace string) RunOption

WithRunWorkspace sets a workspace to the container.

type Service

type Service interface {
	Run(ctx context.Context, options ...RunOption) error
	Build(ctx context.Context, options ...BuildOption) error
}

Service provided methods to run cmdproxy as a container, and to build the image for it.

func NewCmdService

func NewCmdService(options ...CmdServiceOption) (Service, error)

NewCmdService creates and returns a new container service based on exec.Cmd.

Jump to

Keyboard shortcuts

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