Documentation
¶
Index ¶
- func CompileNames(str string) string
- type Client
- func (c *Client) Build(service string) (*Pipes, error)
- func (c *Client) BuildAll() (*Pipes, error)
- func (c *Client) Containers(all bool) ([]types.Container, error)
- func (c *Client) Convert() (*Pipes, error)
- func (c *Client) Create(service string) (*Pipes, error)
- func (c *Client) CreateAll() (*Pipes, error)
- func (c *Client) Down() (*Pipes, error)
- func (c *Client) Events() (*Pipes, error)
- func (c *Client) Exec(service string, commands ...string) (*Pipes, error)
- func (c *Client) Images() ([]types.ImageSummary, error)
- func (c *Client) Kill(service string) (*Pipes, error)
- func (c *Client) KillAll() (*Pipes, error)
- func (c *Client) Logs(service string) (*Pipes, error)
- func (c *Client) LogsAll() (*Pipes, error)
- func (c *Client) LogsAllStream() (*Pipes, error)
- func (c *Client) LogsStream(service string) (*Pipes, error)
- func (c *Client) Networks() ([]types.NetworkResource, error)
- func (c *Client) Pause(service string) (*Pipes, error)
- func (c *Client) PauseAll() (*Pipes, error)
- func (c *Client) Port(service string) ([]types.Port, error)
- func (c *Client) Ps() ([]types.Container, error)
- func (c *Client) PsAll() ([]types.Container, error)
- func (c *Client) Restart(service string) (*Pipes, error)
- func (c *Client) RestartAll() (*Pipes, error)
- func (c *Client) Rm(service string) (*Pipes, error)
- func (c *Client) RmAll() (*Pipes, error)
- func (c *Client) Run(service string, commands ...string) (*Pipes, error)
- func (c *Client) Start(service string) (*Pipes, error)
- func (c *Client) StartAll() (*Pipes, error)
- func (c *Client) Stop(service string) (*Pipes, error)
- func (c *Client) StopAll() (*Pipes, error)
- func (c *Client) Top(service string) (*Pipes, error)
- func (c *Client) TopAll() (*Pipes, error)
- func (c *Client) Unpause(service string) (*Pipes, error)
- func (c *Client) UnpauseAll() (*Pipes, error)
- func (c *Client) Up() (*Pipes, error)
- func (c *Client) Volumes() ([]*types.Volume, error)
- func (c *Client) Wait()
- type Pipes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileNames ¶
CompileNames regenerate strings to fit compose name standards.
Types ¶
type Client ¶
type Client struct { // UsePipes use pipes to communicate with docker compose. UsePipes bool // contains filtered or unexported fields }
Client is a docker compose client.
func NewClientWithContext ¶
NewClientWithContext create a new docker compose client with custom context.
func (*Client) Containers ¶
Containers gets compose containers
func (*Client) Down ¶
Down stops containers and removes containers, networks, volumes, and images created by up.
func (*Client) Images ¶
func (c *Client) Images() ([]types.ImageSummary, error)
Images lists images used by the created containers.
func (*Client) LogsAllStream ¶
LogsAllStream shows all container logs as a stream.
func (*Client) LogsStream ¶
LogsStream shows container logs as a stream.
func (*Client) Networks ¶
func (c *Client) Networks() ([]types.NetworkResource, error)
Networks gets compose networks
func (*Client) RestartAll ¶
RestartAll restart service containers.
func (*Client) UnpauseAll ¶
UnpauseAll unpauses all containers.
type Pipes ¶ added in v0.2.0
type Pipes struct { Stdin io.WriteCloser Stdout io.ReadCloser Stderr io.ReadCloser }
Pipes is a struct that holds the pipes of a command.
func (*Pipes) StderrBytes ¶ added in v0.2.0
StderrBytes reads all bytes from stderr pipe.
func (*Pipes) StderrString ¶ added in v0.2.0
StderrString reads all bytes from stderr pipe and convert string.
func (*Pipes) StdoutBytes ¶ added in v0.2.0
StdoutBytes reads all bytes from stdout pipe.
func (*Pipes) StdoutString ¶ added in v0.2.0
StdoutString reads all bytes from stdout pipe and convert string.