sut

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildContainerConfig

func BuildContainerConfig(config SutConfig) (*docker.ContainerConfig, error)

Types

type Component

type Component struct {
	Container docker.Container
	// contains filtered or unexported fields
}

func New

func New(cli *docker.Docker, config SutConfig) (*Component, error)

func (*Component) Logs

func (c *Component) Logs(ctx context.Context) (io.Reader, error)

func (*Component) Name

func (c *Component) Name() string

func (*Component) Start

func (c *Component) Start(ctx context.Context) error

func (*Component) Stop

func (c *Component) Stop(ctx context.Context) error

type SutConfig

type SutConfig struct {
	// Path to dir binary source files that will be
	// build and executed into docker containers as a SUT.
	Path string
	// Env is list of environment variables will be passed to SUT.
	Env []string
	// ExposedPorts is a list of port that will be exposed and forwarded
	// to docker host.
	ExposedPorts []int
	// RuntimeTypeCommand allows to distinguish between service and simple command binary.
	RuntimeTypeCommand bool
	// contains filtered or unexported fields
}

SutConfig is a configuration required to buld and run sut into docker container.

func (*SutConfig) Build

func (c *SutConfig) Build() error

Jump to

Keyboard shortcuts

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