Documentation ¶
Index ¶
- type Client
- func (co *Client) GetJobAllocations(jobId string) (alls []*api.Allocation, err error)
- func (co *Client) GetJobFromCode(code string) (*api.Job, error)
- func (co *Client) GetJobStatus(jobId string) (j *api.Job, err error)
- func (co *Client) IsValid(code string) bool
- func (co *Client) Plan(job *api.Job, diff bool) (plan *api.JobPlanResponse, err error)
- func (co *Client) Run(job *api.Job) (jr *api.JobRegisterResponse, err error)
- func (co *Client) Stop(jobID string, purge bool) (evalID string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶ added in v0.2.0
NewClient returns a new client configured with the default values for Nomad See: https://godoc.org/github.com/hashicorp/nomad/api#DefaultConfig
func (*Client) GetJobAllocations ¶ added in v0.2.0
func (co *Client) GetJobAllocations(jobId string) (alls []*api.Allocation, err error)
func (*Client) GetJobFromCode ¶ added in v0.2.0
GetJobFromCode is parsing the HCL code and providing a api.Job{} pointer
func (*Client) GetJobStatus ¶ added in v0.2.0
func (*Client) Plan ¶ added in v0.2.0
Plan is parsing the HCL code and registering the Job into Nomad
Click to show internal directories.
Click to hide internal directories.