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 ¶
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 ¶
func (*Runtime) BackgroundExecWithChan ¶
func (*Runtime) Copy ¶
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 ¶
func (o *Runtime) CreateContainer(c engine.ContainerRef) error
This is just a wrapper around Create for readability
func (*Runtime) ExecPostRunBlockingCmds ¶
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 ¶
func (*Runtime) ExecPostRunNonBlockingCmds ¶
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 ¶
func (*Runtime) RegisterPostExecCleanupFunc ¶
func (o *Runtime) RegisterPostExecCleanupFunc(f func())
func (*Runtime) RegisterPreExecCleanupFunc ¶
func (o *Runtime) RegisterPreExecCleanupFunc(f func())
func (*Runtime) Running ¶
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