runner

package
v0.0.0-...-af8e7ac Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedisDefaultImage = "redis:7.2.4"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisDB

type RedisDB 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
}

RedisDB manages the execution of an instance of a dockerized RedisDB for tests.

func (*RedisDB) Address

func (r *RedisDB) Address() string

Address returns the address successfully used by the readiness check.

func (*RedisDB) ContainerAddress

func (r *RedisDB) ContainerAddress() string

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

func (*RedisDB) ContainerID

func (r *RedisDB) ContainerID() string

ContainerID returns the container ID of this RedisDB

func (*RedisDB) HostAddress

func (r *RedisDB) HostAddress() string

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

func (*RedisDB) Run

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

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

func (*RedisDB) Start

func (r *RedisDB) Start() error

Start starts the RedisDB container using an ifrit runner

func (*RedisDB) Stop

func (r *RedisDB) Stop() error

Stop stops and removes the RedisDB container

Jump to

Keyboard shortcuts

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