Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IService ¶
IService represents an ephemeral Docker container. It mainly serves to simplify the Docker container API.
type IServiceSpecification ¶
type IServiceSpecification interface { GetFullyQualifiedImageName() string GetContainerConfig() *container.Config GetHostConfig() *container.HostConfig }
IServiceSpecification defines the necessary data for creating a Service
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader wraps a docker Client and exposes a simpler interface for creating ephemeral Services
func NewLoaderFromClient ¶
NewLoaderFromClient creates a Loader from a docker Client
func (Loader) StartService ¶
StartService creates a new Service from a given service specification. The process is cancellable with a context.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides a concrete implementation for IService. Service may be embedded into specific Container types to implement IService
func (Service) GetIPAddress ¶
GetIPAddress returns the Service's internal IP Address accessible from the Docker host.
type ServiceSpecification ¶
type ServiceSpecification struct { FullyQualifiedImageName string ContainerConfig *container.Config HostConfig *container.HostConfig }
ServiceSpecification provides a simple implementation of IServiceSpecification
func (*ServiceSpecification) GetContainerConfig ¶
func (s *ServiceSpecification) GetContainerConfig() *container.Config
GetContainerConfig returns the specification's container configuration. This contains host independant configuration details.
func (*ServiceSpecification) GetFullyQualifiedImageName ¶
func (s *ServiceSpecification) GetFullyQualifiedImageName() string
GetFullyQualifiedImageName returns an image's fully qualified name i.e. "library/hello-world"
func (*ServiceSpecification) GetHostConfig ¶
func (s *ServiceSpecification) GetHostConfig() *container.HostConfig
GetHostConfig returns the specification's host dependant configuration such as bind mounts.