vault: github.com/hashicorp/vault/helper/testhelpers/docker Index | Files

package docker

import "github.com/hashicorp/vault/helper/testhelpers/docker"

Index

Package Files

testhelpers.go

type RunOptions Uses

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 Uses

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

func NewServiceRunner Uses

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

func (*Runner) Start Uses

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

func (*Runner) StartService Uses

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

type Service Uses

type Service struct {
    Config  ServiceConfig
    Cleanup func()
}

type ServiceAdapter Uses

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 Uses

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

type ServiceHostPort Uses

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

func NewServiceHostPort Uses

func NewServiceHostPort(host string, port int) *ServiceHostPort

func NewServiceHostPortParse Uses

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

func (ServiceHostPort) Address Uses

func (s ServiceHostPort) Address() string

func (ServiceHostPort) URL Uses

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

type ServiceURL Uses

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

func NewServiceURL Uses

func NewServiceURL(u url.URL) *ServiceURL

func NewServiceURLParse Uses

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

func (ServiceURL) Address Uses

func (s ServiceURL) Address() string

func (ServiceURL) URL Uses

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

Package docker imports 19 packages (graph) and is imported by 18 packages. Updated 2020-10-12. Refresh now. Tools for package owners.