Documentation
¶
Index ¶
- func BuildImage(host Host, tag, context string) error
- func Launch(host Host, s *Service) (err error)
- type Host
- type LocalHost
- func (l *LocalHost) BuildImage(tag, context string) error
- func (l *LocalHost) Exec(args ...string) (err error)
- func (l *LocalHost) Launch(service *Service) error
- func (l *LocalHost) Service(name string) *Service
- func (l *LocalHost) Services() ([]*Service, error)
- func (l *LocalHost) SetStderr(stderr io.Writer)
- func (l *LocalHost) SetStdin(stdin io.Reader)
- func (l *LocalHost) SetStdout(stdout io.Writer)
- type RemoteHost
- func (r *RemoteHost) BuildImage(tag, context string) error
- func (r *RemoteHost) Exec(args ...string) (err error)
- func (r *RemoteHost) Launch(service *Service) error
- func (r *RemoteHost) Service(name string) *Service
- func (r *RemoteHost) Services() ([]*Service, error)
- func (r *RemoteHost) SetStderr(stderr io.Writer)
- func (r *RemoteHost) SetStdin(stdin io.Reader)
- func (r *RemoteHost) SetStdout(stdout io.Writer)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildImage ¶
BuildImage builds a Docker image on the given host
Types ¶
type Host ¶
type Host interface {
SetStdin(io.Reader)
SetStdout(io.Writer)
SetStderr(io.Writer)
Exec(...string) error
}
Host represents a docker host where commands can be ran, this can be local or remote server
type LocalHost ¶
type LocalHost struct {
// contains filtered or unexported fields
}
func (*LocalHost) BuildImage ¶
BuildImage builds a Docker image on the local platform
type RemoteHost ¶
type RemoteHost struct {
// contains filtered or unexported fields
}
func Remote ¶
func Remote(s hosting.Server) *RemoteHost
func (*RemoteHost) BuildImage ¶
func (r *RemoteHost) BuildImage(tag, context string) error
BuildImage builds a Docker image on the remote platform
func (*RemoteHost) Exec ¶
func (r *RemoteHost) Exec(args ...string) (err error)
func (*RemoteHost) Launch ¶
func (r *RemoteHost) Launch(service *Service) error
func (*RemoteHost) Service ¶
func (r *RemoteHost) Service(name string) *Service
func (*RemoteHost) Services ¶
func (r *RemoteHost) Services() ([]*Service, error)
func (*RemoteHost) SetStderr ¶
func (r *RemoteHost) SetStderr(stderr io.Writer)
func (*RemoteHost) SetStdin ¶
func (r *RemoteHost) SetStdin(stdin io.Reader)
func (*RemoteHost) SetStdout ¶
func (r *RemoteHost) SetStdout(stdout io.Writer)
type Service ¶
type Service struct {
Host
ID string
Status string
Name string
Image string
Network string
Privileged bool
Entrypoint string
Command string
RestartPolicy string // e.g., "always", "unless-stopped", "on-failure"
Ports map[int]int
Mounts map[string]string
Copied map[string]string
Env map[string]string
}
Service represents a docker container instance existing on a given Platform
func GetService ¶
GetService returns a specific service by name from the host
func ListServices ¶
ListServices returns a list of all services on the given host or an error on failure
Click to show internal directories.
Click to hide internal directories.