spawner

package module
v0.0.0-...-c593673 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

README

spawner

Start, list and kill previously defined task definitions on AWS ECS. This is a starting point!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeWorld

func DecodeWorld(w *World, r io.Reader) error

func EncodeWorlds

func EncodeWorlds(w io.Writer, worlds ...*World) error

Types

type Spawner

type Spawner interface {
	// Name of this spawner.
	Name() string
	// Spawn starts a World. Once the function returns, World should
	// be ready to accept connections on World.Addr.
	Spawn(ctx context.Context, r io.Reader) (*World, error)
	// Kill stops & purges a previously spawned World.
	Kill(ctx context.Context, w World) error
	// Ps lists the currently running Worlds in the given Galaxy g.
	Ps(ctx context.Context, g string) ([]*World, error)
}

type World

type World struct {
	Id      string `json:"id"`
	Galaxy  string `json:"galaxy"`
	Addr    string `json:"addr"`
	Spawner string `json:"spawner"`

	Details json.RawMessage `json:"details"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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