This section is empty.


This section is empty.


This section is empty.


type RunOptions

type RunOptions struct {
	ImageRepo       string
	ImageTag        string
	ContainerName   string
	Cmd             []string
	Env             []string
	NetworkID       string
	CopyFromTo      map[string]string
	Ports           []string
	DoNotAutoRemove bool
	AuthUsername    string
	AuthPassword    string

type Runner

type Runner struct {
	DockerAPI  *client.Client
	RunOptions RunOptions

func NewServiceRunner

func NewServiceRunner(opts RunOptions) (*Runner, error)

func (*Runner) Start

func (d *Runner) Start(ctx context.Context) (*types.ContainerJSON, []string, error)

func (*Runner) StartService

func (d *Runner) StartService(ctx context.Context, connect ServiceAdapter) (*Service, error)

type Service

type Service struct {
	Config  ServiceConfig
	Cleanup func()

type ServiceAdapter

type ServiceAdapter func(ctx context.Context, host string, port int) (ServiceConfig, error)

    ServiceAdapter verifies connectivity to the service, then returns either the connection string (typically a URL) and nil, or empty string and an error.

    type ServiceConfig

    type ServiceConfig interface {
    	Address() string
    	URL() *url.URL

    type ServiceHostPort

    type ServiceHostPort struct {
    	// contains filtered or unexported fields

    func NewServiceHostPort

    func NewServiceHostPort(host string, port int) *ServiceHostPort

    func NewServiceHostPortParse

    func NewServiceHostPortParse(s string) (*ServiceHostPort, error)

    func (ServiceHostPort) Address

    func (s ServiceHostPort) Address() string

    func (ServiceHostPort) URL

    func (s ServiceHostPort) URL() *url.URL

    type ServiceURL

    type ServiceURL struct {
    	// contains filtered or unexported fields

    func NewServiceURL

    func NewServiceURL(u url.URL) *ServiceURL

    func NewServiceURLParse

    func NewServiceURLParse(s string) (*ServiceURL, error)

    func (ServiceURL) Address

    func (s ServiceURL) Address() string

    func (ServiceURL) URL

    func (s ServiceURL) URL() *url.URL

    Source Files