Documentation
¶
Index ¶
- type Error
- type Runtime
- func (o *Runtime) Attach() error
- func (o *Runtime) BackgroundExec(args []string)
- func (o *Runtime) BackgroundExecWithChan(args []string, stdout chan string)
- func (o *Runtime) Copy(source, destination string) (string, error)
- func (o *Runtime) Create(c engine.ContainerRef) error
- func (o *Runtime) CreateContainer(c engine.ContainerRef) error
- func (o *Runtime) Exec(args []string) (string, error)
- func (o *Runtime) ExecPostRunBlockingCmds() error
- func (o *Runtime) ExecPostRunBlockingHooks() error
- func (o *Runtime) ExecPostRunNonBlockingCmds()
- func (o *Runtime) Inspect(query string) (string, error)
- func (o *Runtime) RegisterBlockingPostStartCmd(cmd []string)
- func (o *Runtime) RegisterPostExecCleanupFunc(f func())
- func (o *Runtime) RegisterPreExecCleanupFunc(f func())
- func (o *Runtime) Run() error
- func (o *Runtime) Running() (bool, error)
- func (o *Runtime) Start(attach bool) error
- func (o *Runtime) StartAndAttach() error
- func (o *Runtime) Stop(timeout int) error
- func (o *Runtime) Trap()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runtime ¶ added in v1.0.0
type Runtime struct {
// PostStartExecHooks are functions that are defined by features in order
// to allow features to self-initialize things _after_ the container has
// started.
PostStartExecHooks [](func(features.ContainerRuntime) error)
// BlockingPostStartExecCommands are typically populated by the functions
// defined in the PostStartExecHooks list above. This is a string slice that
// is run inside the container after it is started but before an interactive
// session is attached. If this fails, ocm-container will exit before attaching.
BlockingPostStartExecCmds [][]string
// NonBlockingPostStartExecCmds are similar to the BlockingPostStartExecCmds
// defined above, however if these commands are unsuccessful on the container
// ocm-container will not exit and will continue to boot.
NonBlockingPostStartExecCmds [][]string
// contains filtered or unexported fields
}
func (*Runtime) BackgroundExec ¶ added in v1.0.0
func (*Runtime) BackgroundExecWithChan ¶ added in v1.0.0
func (*Runtime) Copy ¶ added in v1.0.0
Copy takes a source and destination (optionally with a [container]: prefixed) and executes a container engine "cp" command with those as arguments
func (*Runtime) CreateContainer ¶ added in v1.0.0
func (o *Runtime) CreateContainer(c engine.ContainerRef) error
This is just a wrapper around Create for readability
func (*Runtime) ExecPostRunBlockingCmds ¶ added in v1.0.0
ExecPostRunBlockingCmds starts the blocking exec commands stored in the *Runtime config Blocking commands are those that must succeed to ensure a working ocm-container
func (*Runtime) ExecPostRunBlockingHooks ¶ added in v1.0.0
func (*Runtime) ExecPostRunNonBlockingCmds ¶ added in v1.0.0
func (o *Runtime) ExecPostRunNonBlockingCmds()
ExecPostRunNonBlockingCmds starts the non-blocking exec commands stored in the *Runtime config Non-blocking commands are those that may or may not succeed, but are not critical to the operation of the container
func (*Runtime) RegisterBlockingPostStartCmd ¶ added in v1.0.0
func (*Runtime) RegisterPostExecCleanupFunc ¶ added in v1.0.0
func (o *Runtime) RegisterPostExecCleanupFunc(f func())
func (*Runtime) RegisterPreExecCleanupFunc ¶ added in v1.0.0
func (o *Runtime) RegisterPreExecCleanupFunc(f func())
func (*Runtime) Running ¶ added in v1.0.0
Running returns a boolean indicating if the container is running in that Point In Time Keep in mind the state could change at any time