Documentation
¶
Index ¶
- Constants
- func EnvSocket() (string, error)
- func GetDaemonSocketPath() string
- func SocketExists(path string) bool
- func SplitOutput(src io.Reader) ([]byte, []byte, error)
- type APIClient
- func (c *APIClient) Compatible(ctx context.Context) (bool, error)
- func (c *APIClient) ContainerExists(ctx context.Context, cID string) (bool, error)
- func (c *APIClient) Create(ctx context.Context, cfg Config) (string, error)
- func (c *APIClient) ImageExists(ctx context.Context, digest string) (bool, error)
- func (c *APIClient) Logs(ctx context.Context, cID string) (string, string, error)
- func (c *APIClient) PullImage(ctx context.Context, image string) error
- func (c *APIClient) Remove(ctx context.Context, cID string) error
- func (c *APIClient) Start(ctx context.Context, cID string) error
- func (c *APIClient) Stop(ctx context.Context, cID string) error
- func (c *APIClient) Wait(ctx context.Context, cID string) (int, string, error)
- type Client
- type Config
- type CreateConfig
- type HTTPDoer
- type HostConfig
- type Memory
- type Output
- type Runtime
- func (r *Runtime) CleanUp(ctx context.Context, cID string) error
- func (r *Runtime) Compatible(ctx context.Context) (bool, error)
- func (r *Runtime) GetImage(ctx context.Context, image string) error
- func (r *Runtime) GetOutput(ctx context.Context, cID string) (Output, error)
- func (r *Runtime) Launch(ctx context.Context, cfg Config) (string, error)
- func (r *Runtime) Run(ctx context.Context, cfg Config) (Output, error)
- type ServerMsg
Constants ¶
View Source
const ( StdOut byte = 1 StdErr byte = 2 )
View Source
const APIVersion = "1.47"
View Source
const (
FallbackSocketPath = "/var/run/docker.sock"
)
View Source
const OK = 0
Variables ¶
This section is empty.
Functions ¶
func GetDaemonSocketPath ¶
func GetDaemonSocketPath() string
func SocketExists ¶
Types ¶
type APIClient ¶
func NewAPIClient ¶
func NewAPIClient() *APIClient
func NewAPIClientWithLogger ¶
func (*APIClient) ContainerExists ¶
func (*APIClient) ImageExists ¶
type Client ¶
type Client interface {
Compatible(context.Context) (bool, error)
ImageExists(context.Context, string) (bool, error)
ContainerExists(context.Context, string) (bool, error)
PullImage(context.Context, string) error
Create(context.Context, Config) (string, error)
Start(context.Context, string) error
Wait(context.Context, string) (int, string, error)
Logs(context.Context, string) (string, string, error)
Stop(context.Context, string) error
Remove(context.Context, string) error
}
type CreateConfig ¶
type CreateConfig struct {
Image string `json:"Image"`
User string `json:"User"`
Env []string `json:"Env"`
WorkingDir string `json:"WorkingDir"`
Cmd []string `json:"Cmd"`
HostConfig HostConfig `json:"HostConfig"`
TTY bool `json:"Tty"`
}
func NewCreateConfig ¶
func NewCreateConfig(in Config) CreateConfig
type HostConfig ¶
Click to show internal directories.
Click to hide internal directories.