dispatcher

package
v0.2.2-linux Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CLEANUP_PYTHON = `` /* 1224-byte string literal not displayed */
View Source
const Papertrail = "Papertrail"

Variables

This section is empty.

Functions

func MakeNomadJob

func MakeNomadJob(w string, c *client, j *types.Job) (string, error)

func NewNomadClient

func NewNomadClient(cfg NomadConfig) *client

func Set

func Set(d Dispatcher)

Types

type Dispatcher

type Dispatcher interface {
	Dispatch(workspaceID string, job *types.Job) (string, error)
}

func Get

func Get() Dispatcher

type JobLog

type JobLog struct {
	Destination    string
	Aggregator     string
	PapertrailHost string
}

type Mem

type Mem struct {
	Store []string
	sync.Mutex
}

func NewInMemory

func NewInMemory() *Mem

func (*Mem) Dispatch

func (c *Mem) Dispatch(w string, j *types.Job) (string, error)

type NomadConfig

type NomadConfig struct {
	Address    string
	Username   string
	Password   string
	Datacenter string
	Image      string
	CPU        string
	Memory     string
	ConsulAddr string
	Log        *JobLog
}

Jump to

Keyboard shortcuts

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