docker

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2020 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunOptions added in v1.6.0

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 added in v1.6.0

type Runner struct {
	DockerAPI  *client.Client
	RunOptions RunOptions
}

func NewServiceRunner added in v1.6.0

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

func (*Runner) Start added in v1.6.0

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

func (*Runner) StartService added in v1.6.0

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

type Service added in v1.6.0

type Service struct {
	Config  ServiceConfig
	Cleanup func()
}

type ServiceAdapter added in v1.6.0

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 added in v1.6.0

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

type ServiceHostPort added in v1.6.0

type ServiceHostPort struct {
	// contains filtered or unexported fields
}

func NewServiceHostPort added in v1.6.0

func NewServiceHostPort(host string, port int) *ServiceHostPort

func NewServiceHostPortParse added in v1.6.0

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

func (ServiceHostPort) Address added in v1.6.0

func (s ServiceHostPort) Address() string

func (ServiceHostPort) URL added in v1.6.0

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

type ServiceURL added in v1.6.0

type ServiceURL struct {
	// contains filtered or unexported fields
}

func NewServiceURL added in v1.6.0

func NewServiceURL(u url.URL) *ServiceURL

func NewServiceURLParse added in v1.6.0

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

func (ServiceURL) Address added in v1.6.0

func (s ServiceURL) Address() string

func (ServiceURL) URL added in v1.6.0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL