Documentation ¶
Index ¶
- Variables
- func Attach(id string, stdin io.Reader, stdout io.Writer, attachReady chan bool, ...) error
- func Checkpoint(id string, opts CntCheckPointOptions) (string, error)
- func Commit(id string, opts CntCommitOptions) (string, error)
- func Create(opts CreateOptions) ([]string, error)
- func Diff(id string) ([]string, error)
- func Exec(sessionID string, opts ExecOption)
- func HealthCheck(id string) (string, error)
- func Inspect(id string) (string, error)
- func Kill(id string) error
- func List() ([]entities.ListContainer, error)
- func Logs(id string) ([]string, error)
- func NewExecSession(id string, opts ExecOption) (string, error)
- func Pause(id string) error
- func Port(id string) ([]string, error)
- func Prune() ([]string, error)
- func Remove(id string) ([]string, error)
- func Rename(id string, name string) error
- func ResizeContainerTTY(id string, width int, height int) error
- func ResizeExecTty(id string, height int, width int)
- func Restore(opts CntRestoreOptions) (string, error)
- func Start(id string) error
- func Stats(id string, opts *containers.StatsOptions) (chan entities.ContainerStatsReport, error)
- func Status(id string) (string, error)
- func Stop(id string) error
- func Top(id string) ([][]string, error)
- func Unpause(id string) error
- type CntCheckPointOptions
- type CntCommitOptions
- type CntRestoreOptions
- type CreateOptions
- type ExecOption
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidCreateTimeout = errors.New("invalid container create timeout value")
Functions ¶
func Attach ¶ added in v0.10.0
func Attach(id string, stdin io.Reader, stdout io.Writer, attachReady chan bool, detachKey string) error
Attach will attach to a running container.
func Checkpoint ¶ added in v0.7.0
func Checkpoint(id string, opts CntCheckPointOptions) (string, error)
Checkpoint a running container.
func Commit ¶ added in v0.5.0
func Commit(id string, opts CntCommitOptions) (string, error)
Commit creates an image from a container's changes.
func Exec ¶ added in v0.2.0
func Exec(sessionID string, opts ExecOption)
Exec returns the diff of the specified container ID.
func HealthCheck ¶ added in v0.9.0
HealthCheck runs the health check of a container.
func List ¶
func List() ([]entities.ListContainer, error)
List returns list of containers information.
func NewExecSession ¶ added in v0.2.0
func NewExecSession(id string, opts ExecOption) (string, error)
NewExecSession creates a new session and returns its id.
func ResizeContainerTTY ¶ added in v0.10.0
ResizeContainerTTY resize the attached container tty size.
func ResizeExecTty ¶ added in v0.2.0
ResizeExecTty resizes exec session tty.
func Restore ¶ added in v0.7.0
func Restore(opts CntRestoreOptions) (string, error)
Restore performs container checkpoint restore.
func Stats ¶ added in v0.2.0
func Stats(id string, opts *containers.StatsOptions) (chan entities.ContainerStatsReport, error)
Stats returns live stream of containers stats result.
Types ¶
type CntCheckPointOptions ¶ added in v0.7.0
type CntCheckPointOptions struct { Export string CreateImage string IgnoreRootFs bool Keep bool LeaveRunning bool TCPEstablished bool PrintStats bool PreCheckpoint bool WithPrevious bool FileLocks bool }
CntCheckPointOptions is container checkpoint options.
type CntCommitOptions ¶ added in v0.5.0
type CntCommitOptions struct { Author string Changes []string Message string Format string Pause bool Squash bool Image string }
CntCommitOptions containers commit options.
type CntRestoreOptions ¶ added in v0.7.0
type CntRestoreOptions struct { ContainerID string PodID string Name string Publish []string Import string Keep bool IgnoreStaticIP bool IgnoreStaticMAC bool FileLocks bool PrintStats bool TCPEstablished bool IgnoreVolumes bool IgnoreRootfs bool }
CntRestoreOptions is container restore options.
type CreateOptions ¶
type CreateOptions struct { Name string Labels []string Image string Remove bool Privileged bool Timeout string WorkDir string EnvVars []string EnvFile []string EnvMerge []string UnsetEnv []string EnvHost bool UnsetEnvAll bool Umask string User string HostUsers []string GroupEntry string PasswdEntry string Pod string Hostname string IPAddress string Network string MacAddress string Publish []string Expose []string PublishAll bool DNSServer []string DNSOptions []string DNSSearchDomain []string Volume string ImageVolume string Mount string SelinuxOpts []string ApparmorProfile string Seccomp string SecNoNewPriv bool SecMask string SecUnmask string HealthCmd string HealthInterval string HealthRetries string HealthStartPeroid string HealthTimeout string HealthOnFailure string HealthStartupCmd string HealthStartupInterval string HealthStartupRetries string HealthStartupSuccess string HealthStartupTimeout string }
CreateOptions container create options.
type ExecOption ¶ added in v0.2.0
type ExecOption struct { Cmd []string Tty bool Detach bool Interactive bool Privileged bool WorkDir string EnvVariables []string EnvFile []string User string OutputStream io.Writer InputStream *bufio.Reader TtyWidth int TtyHeight int DetachKeys string }
ExecOption container exec options.