runner

package
v0.0.0-...-1665488 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pull

func Pull(ctx context.Context) ([2]string, error)

Pull pulls latest images of i1820/elrunner and redis:alpine. Please consider that image names are defined globally.

Types

type Env

type Env struct {
	Name  string
	Value string
}

Env provides environment variables in runners

type Runner

type Runner struct {
	ID      string `json:"id" bson:"id"`
	Port    string `json:"port" bson:"port"`
	RedisID string `json:"rid" bson:"redisid"`
}

Runner represents runner docker information

func New

func New(ctx context.Context, name string, envs []Env) (Runner, error)

New creates runner docker with given user name mgu represents mongo url that is used in runners for collecting errors and access to thing data

func (Runner) Remove

func (r Runner) Remove(ctx context.Context) error

Remove removes runner and redis dockers

func (Runner) Restart

func (r Runner) Restart(ctx context.Context) error

Restart restarts runner docker (not redis)

func (Runner) Show

func (r Runner) Show(ctx context.Context) ([2]types.ContainerJSON, error)

Show returns detail information about runner and redis dockers in the array with a length of 2

Jump to

Keyboard shortcuts

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