nomad

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*api.Client
}

Client is a Nomad API client

func NewNomadClient

func NewNomadClient(c *api.Config) (*Client, error)

NewNomadClient creates a new Nomad API client

func (*Client) AdjustTaskGroupCount

func (n *Client) AdjustTaskGroupCount(job *api.Job, groupName string, delta int) error

AdjustTaskGroupCount raises/lowers the count of a task group

func (*Client) GetNodeID

func (n *Client) GetNodeID(name string) (id string, err error)

GetNodeID gets a Nomad node ID from a node name, and errors if more/less than one matching name is found

func (*Client) RestartJob

func (n *Client) RestartJob(jobName string) error

RestartJob restarts a nomad job by deregistering/registering

func (*Client) RestartTaskGroup

func (n *Client) RestartTaskGroup(jobName string, groupName string) error

RestartTaskGroup restarts a Nomad task group by temporarily setting the count to zero

func (*Client) SetTaskGroupCount

func (n *Client) SetTaskGroupCount(job *api.Job, groupName string, count int) error

SetTaskGroupCount sets the count of a task group to the given count

Jump to

Keyboard shortcuts

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