daemon

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach added in v1.3.0

func Attach(token *jwt.Token, name string, in <-chan []byte, out chan<- []byte) error

Attach will attach to an already running daemon and forward stdout/err and allow for stdin

func AttachHandler added in v1.3.0

func AttachHandler(w http.ResponseWriter, r *http.Request, token *jwt.Token)

AttachHandler handles attach requests

func Kill added in v1.3.0

func Kill(name string, wipe bool, token *jwt.Token) error

Kill a container with the given name iff it is owned by the owner of the token

func KillHandler added in v1.3.0

func KillHandler(w http.ResponseWriter, r *http.Request, token *jwt.Token)

KillHandler handles kill requests

func List

func List(token *jwt.Token) ([]docker.APIContainers, error)

List the daemons running on this token.

func ListHandler

func ListHandler(w http.ResponseWriter, r *http.Request, token *jwt.Token)

ListHandler handles list requests

func ProxyHandler added in v1.4.0

func ProxyHandler(w http.ResponseWriter, r *http.Request)

ProxyHandler proxies requests to daemons

func SpawnHandler

func SpawnHandler(w http.ResponseWriter, r *http.Request, token *jwt.Token)

SpawnHandler handles spawn requests

Types

type Info

type Info struct {
	Name    string
	Address string
	Ports   map[int]int
}

Info is information about a running deamon.

func Spawn

func Spawn(token *jwt.Token, name, image string, options Options) (*Info, error)

Spawn a daemon with the given options.

type Options

type Options struct {
	Meter   *metering.Meter
	Restart bool
	Ports   []int
	Files   map[string][]byte
	StdOut  chan []byte
	StdErr  chan []byte
	Done    chan bool
}

Options contains configuration options for the daemon spawn.

Jump to

Keyboard shortcuts

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