Documentation ¶
Index ¶
- Constants
- func And(left, right string) string
- func Convert(c *project.ServiceConfig) (*runconfig.Config, *runconfig.HostConfig, error)
- func ConvertToApi(c *project.ServiceConfig) (*dockerclient.ContainerConfig, error)
- func CreateClient(c ClientOpts) (dockerclient.Client, error)
- func CreateTar(p *project.Project, name string) (io.ReadCloser, error)
- func Filter(vs []string, f func(string) bool) []string
- func GetContainerById(client dockerclient.Client, id string) (*dockerclient.Container, error)
- func GetContainerByName(client dockerclient.Client, name string) (*dockerclient.Container, error)
- func GetContainersByFilter(client dockerclient.Client, filter ...string) ([]dockerclient.Container, error)
- func NewProject(context *Context) (*project.Project, error)
- func OneName(client dockerclient.Client, project, service string) (string, error)
- func PullImage(client dockerclient.Client, service *Service, image string) error
- type Builder
- type ClientFactory
- type ClientOpts
- type Container
- func (c *Container) Create(imageName string) (*dockerclient.Container, error)
- func (c *Container) Delete() error
- func (c *Container) Down() error
- func (c *Container) Id() (string, error)
- func (c *Container) Info() (project.Info, error)
- func (c *Container) Kill() error
- func (c *Container) Log() error
- func (c *Container) Name() string
- func (c *Container) OutOfSync(imageName string) (bool, error)
- func (c *Container) Port(port string) (string, error)
- func (c *Container) Pull() error
- func (c *Container) Rebuild(imageName string) (*dockerclient.Container, error)
- func (c *Container) Restart() error
- func (c *Container) Up(imageName string) error
- type Context
- type DaemonBuilder
- type Label
- type Namer
- type Service
- func (s *Service) Build() error
- func (s *Service) Config() *project.ServiceConfig
- func (s *Service) Containers() ([]project.Container, error)
- func (s *Service) Create() error
- func (s *Service) Delete() error
- func (s *Service) DependentServices() []project.ServiceRelationship
- func (s *Service) Down() error
- func (s *Service) Info() (project.InfoSet, error)
- func (s *Service) Kill() error
- func (s *Service) Log() error
- func (s *Service) Name() string
- func (s *Service) Pull() error
- func (s *Service) Restart() error
- func (s *Service) Scale(scale int) error
- func (s *Service) Start() error
- func (s *Service) Up() error
- type ServiceFactory
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
func Convert(c *project.ServiceConfig) (*runconfig.Config, *runconfig.HostConfig, error)
func ConvertToApi ¶
func ConvertToApi(c *project.ServiceConfig) (*dockerclient.ContainerConfig, error)
func CreateClient ¶
func CreateClient(c ClientOpts) (dockerclient.Client, error)
func GetContainerById ¶
func GetContainerById(client dockerclient.Client, id string) (*dockerclient.Container, error)
func GetContainerByName ¶
func GetContainerByName(client dockerclient.Client, name string) (*dockerclient.Container, error)
func GetContainersByFilter ¶
func GetContainersByFilter(client dockerclient.Client, filter ...string) ([]dockerclient.Container, error)
Types ¶
type Builder ¶
type ClientFactory ¶
type ClientFactory interface { // Create constructs a Docker client for the given service. The passed in // config may be nil in which case a generic client for the project should // be returned. Create(service project.Service) dockerclient.Client }
func NewDefaultClientFactory ¶
func NewDefaultClientFactory(opts ClientOpts) (ClientFactory, error)
type ClientOpts ¶
type Container ¶
type Container struct { project.EmptyService // contains filtered or unexported fields }
func NewContainer ¶
func NewContainer(client dockerclient.Client, name string, service *Service) *Container
func (*Container) Create ¶
func (c *Container) Create(imageName string) (*dockerclient.Container, error)
type Context ¶
type Context struct { project.Context Builder Builder ClientFactory ClientFactory ConfigDir string ConfigFile *cliconfig.ConfigFile }
type DaemonBuilder ¶
type DaemonBuilder struct {
// contains filtered or unexported fields
}
func NewDaemonBuilder ¶
func NewDaemonBuilder(context *Context) *DaemonBuilder
type Namer ¶
func NewNamer ¶
func NewNamer(client dockerclient.Client, project, service string) Namer
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(name string, serviceConfig *project.ServiceConfig, context *Context) *Service
func (*Service) Config ¶
func (s *Service) Config() *project.ServiceConfig
func (*Service) DependentServices ¶
func (s *Service) DependentServices() []project.ServiceRelationship
Click to show internal directories.
Click to hide internal directories.