dockercs

package module
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 6 Imported by: 0

README

Docker Chaos Server

A Chaos Server implementation that terminates Docker containers, used by April tool.

What is a Chaos Server ?

Chaos server hosts an API which terminates instances. It is used by April CLI, which runs its algorithm and asks the Chaos Server to finish any selected instances. All Chaos Servers implementations must implement the interface defined in april/destroyer package, so CSs must include that package and implement the Destroyer interface, where the business logic to terminate instances should be defined.

Installation

go get github.com/barbosaigor/dockercs/cmd/...

DockerCS hosts an HTTP API
-u username for chaos server auth
-s password for chaos server auth
-p port number (Default is 7071)

dockercs -u myusername -s mysecret  

DockerCS requests dockerd locally, make sure that DockerCS has access to dockerd locally.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyContainer = errors.New("Empty container")

ErrEmptyContainer implies empty container error

Functions

func Stop

func Stop(container string) error

Stop container

func StopAll

func StopAll(container []string) error

StopAll stops all containers, but if a container throws an error then stop all subsequent operations

Types

type ChaosServerDocker

type ChaosServerDocker struct{}

ChaosServerDocker implements chaos server interface from april/destroyer

func (ChaosServerDocker) ListInstances

func (d ChaosServerDocker) ListInstances(status destroyer.Status) ([]destroyer.Instance, error)

ListInstances lists all instances with corresponding status

func (ChaosServerDocker) OnStart

func (d ChaosServerDocker) OnStart()

OnStart is a life cycle routine when stating the chaos server

func (ChaosServerDocker) Shutdown

func (d ChaosServerDocker) Shutdown(svc string) error

Shutdown turns off a service

type Container

type Container struct {
	ID     string
	Name   string
	Status destroyer.Status
}

Container owns container information

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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