testutils

package
v0.0.0-...-53b0845 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerClient

func DockerClient() (*client.Client, error)

DockerClient returns a new docker client

Types

type ZKConfig

type ZKConfig struct {
	StartupTimeout time.Duration
	ImageName      string
	Entrypoint     []string
	Command        []string
	ClientPort     int
}

ZKConfig captures configuration/runtime constraints for a containerized ZK instance.

func DefaultZKConfig

func DefaultZKConfig() ZKConfig

DefaultZKConfig returns a copy of the default ZK container/runtime configuration.

type ZkControl

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

ZkControl allows testing code to manipulate a running ZK instance.

func StartZookeeper

func StartZookeeper(opts ...func(*ZKConfig)) (*ZkControl, error)

StartZookeeper starts a new zookeeper container.

func (*ZkControl) Addr

func (z *ZkControl) Addr() string

Addr returns the address of the zookeeper node

func (*ZkControl) Teardown

func (z *ZkControl) Teardown() error

Teardown destroys the ZK container

func (*ZkControl) TeardownPanic

func (z *ZkControl) TeardownPanic()

TeardownPanic destroys the ZK container and panics if unsuccessful

Jump to

Keyboard shortcuts

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