nomad

package
v0.0.0-...-ab5c262 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPriority = 50
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NomadJob

type NomadJob struct {
	ID         string
	Name       string
	Datacenter string
	Region     string
	Priority   int
	TaskGroups []*NomadTaskGroup
}

type NomadService

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

func NewNomad

func NewNomad(region string) *NomadService

func (*NomadService) Deregister

func (n *NomadService) Deregister(jobID string, purge bool) error

func (*NomadService) Plan

func (n *NomadService) Plan(job *api.Job) error

func (*NomadService) Prepare

func (n *NomadService) Prepare(nomadJob *NomadJob) (*api.Job, error)

func (*NomadService) Register

func (n *NomadService) Register(job *api.Job) error

type NomadTask

type NomadTask struct {
	Name      string
	Driver    string
	Config    map[string]interface{}
	EnvVars   map[string]string
	Resources *NomadTaskResources
}

type NomadTaskGroup

type NomadTaskGroup struct {
	Name  string
	Tasks []NomadTask
}

type NomadTaskResources

type NomadTaskResources struct {
	CPU         *int
	Cores       *int
	MemoryMB    *int
	MemoryMaxMB *int
	DiskMB      *int
}

Jump to

Keyboard shortcuts

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