minion

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: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectHandler added in v1.2.0

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

ConnectHandler is the http handler for minion connects

func GolemConnectHandler

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

GolemConnectHandler is the http handler for golem connects

func GolemMinionConnectHandler

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

GolemMinionConnectHandler handles the golem connecting to an already connected minion

func Spawn added in v1.2.0

func Spawn(env, output string, files map[string][]byte) ([]byte, string, error)

Spawn will spawn a new minion given * env - environment (Webstrates/<env> image to use) * files - a map of filename -> content of files to write

func SpawnHandler added in v1.2.0

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

SpawnHandler is the http handler for minion spawns

Types

type ConnectEvent

type ConnectEvent struct {
	Event string
	ID    string `json:",omitempty"`
	Type  string `json:",omitempty"`
}

ConnectEvent is an event for connects

func NewGolemConnected

func NewGolemConnected() ConnectEvent

NewGolemConnected creates and returns a ConnectEvent for connected golem

func NewGolemDisconnected

func NewGolemDisconnected() ConnectEvent

NewGolemDisconnected creates and returns a ConnectEvent for disconnected golem

func NewGolemNotFound added in v1.2.0

func NewGolemNotFound(id string) ConnectEvent

NewGolemNotFound creates and returns a ConnectEvent for a connected minion

func NewMinionConnected

func NewMinionConnected(id string, t string) ConnectEvent

NewMinionConnected creates and returns a ConnectEvent for a connected minion

func NewMinionDisconnected

func NewMinionDisconnected(id string) ConnectEvent

NewMinionDisconnected creates and returns a ConnectEvent for a disconnected minion

type Golem

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

Golem represents a connected golem

type Message

type Message struct {
	Type    int
	Content []byte
}

Message is a websocket message

type Minion

type Minion struct {
	ID string
	// contains filtered or unexported fields
}

Minion represents a connected minion

type Output added in v1.2.0

type Output struct {
	StdOut string
	StdErr string `json:",omitempty"`
}

Output is the default information returned from a minion lambda execution

Jump to

Keyboard shortcuts

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