runner

package
v0.0.0-...-579b097 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CouchDBDefaultImage = "couchdb:3.3.3"
	CouchDBUsername     = "admin"
	CouchDBPassword     = "adminpw"
)
View Source
const DefaultStartTimeout = 45 * time.Second

Variables

This section is empty.

Functions

func UniqueName

func UniqueName() string

UniqueName generates base-32 enocded strings for container names.

Types

type CouchDB

type CouchDB struct {
	Client        *docker.Client
	Image         string
	HostIP        string
	HostPort      int
	ContainerPort docker.Port
	Name          string
	StartTimeout  time.Duration
	Binds         []string

	ErrorStream  io.Writer
	OutputStream io.Writer
	// contains filtered or unexported fields
}

CouchDB manages the execution of an instance of a dockerized CounchDB for tests.

func (*CouchDB) Address

func (c *CouchDB) Address() string

Address returns the address successfully used by the readiness check.

func (*CouchDB) ContainerAddress

func (c *CouchDB) ContainerAddress() string

ContainerAddress returns the container address where this CouchDB instance is available.

func (*CouchDB) ContainerID

func (c *CouchDB) ContainerID() string

ContainerID returns the container ID of this CouchDB

func (*CouchDB) HostAddress

func (c *CouchDB) HostAddress() string

HostAddress returns the host address where this CouchDB instance is available.

func (*CouchDB) Run

func (c *CouchDB) Run(sigCh <-chan os.Signal, ready chan<- struct{}) error

Run runs a CouchDB container. It implements the ifrit.Runner interface

func (*CouchDB) Start

func (c *CouchDB) Start() error

Start starts the CouchDB container using an ifrit runner

func (*CouchDB) Stop

func (c *CouchDB) Stop() error

Stop stops and removes the CouchDB container

type NameFunc

type NameFunc func() string

A NameFunc is used to generate container names.

var DefaultNamer NameFunc = UniqueName

DefaultNamer is the default naming function.

Jump to

Keyboard shortcuts

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