Documentation
¶
Index ¶
- func Attach(rootDir, id string, opts AttachOpts) error
- func CleanUp(rootDir, id string) error
- func CopyLogs(rootDir, id string, opts CopyLogsOpts) error
- func Create(rootDir, imageName string, pullOpts registry.PullOpts, ...) (*shim.Shim, *container.Container, error)
- func Delete(rootDir, id string) error
- func GetContainerIds(rootDir, prefix string) []string
- func ProcessHook(rootDir, hookName string, r io.Reader) error
- func Restart(rootDir, id string) error
- func Stop(rootDir, id string) error
- type AttachOpts
- type ContainerInspect
- type ContainerList
- type ContainerListItem
- type CopyLogsOpts
- type ImageList
- type ImageListItem
- type RunResult
- type StartOpts
- type StartResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Attach ¶
func Attach(rootDir, id string, opts AttachOpts) error
func CopyLogs ¶
func CopyLogs(rootDir, id string, opts CopyLogsOpts) error
CopyLogs copies the logs of a container to the writers specified in the options.
func GetContainerIds ¶
GetContainerIds returns a list of container IDs managed by Yaman.
Types ¶
type AttachOpts ¶
type ContainerInspect ¶
type ContainerInspect struct { Id string Root string Config runtimespec.Spec Options container.ContainerOpts Created time.Time Started time.Time Exited time.Time ExposedPorts []network.ExposedPort Image struct { image.Image Config imagespec.Image Manifest imagespec.Manifest } Shim struct { yacs.YacsState Options shim.ShimOpts SocketPath string } }
ContainerInspect is a data transfer structure and represents the result of the `inspect` command.
func Inspect ¶
func Inspect(rootDir, id string) (ContainerInspect, error)
Inspect returns low-level information about a container.
type ContainerList ¶
type ContainerList []ContainerListItem
ContainerList contains the list of containers to show to the user.
func ListContainers ¶
func ListContainers(rootDir string, all bool) (ContainerList, error)
ListContainers returns the list of containers running by default.
Optionally, it can return all containers managed by Yaman (running or not). This function does not return `Container` instances but rather data transfer objects for a "user interface".
type ContainerListItem ¶
type ContainerListItem struct { ID string Image string Command string Status string Created time.Time ExposedPorts []network.ExposedPort }
ContainerListItem contains the data about a container for the user.
type CopyLogsOpts ¶
CopyLogsOpts contains the options for the `CopyLogs` function.
type ImageListItem ¶
type StartResult ¶
type StartResult struct {
ExitStatus int
}