Rename structs

This commit is contained in:
Alex Dadgar
2016-12-14 12:50:08 -08:00
parent 967d6a6a72
commit e495eecece
15 changed files with 221 additions and 230 deletions

View File

@@ -169,12 +169,12 @@ func (j *Jobs) Summary(jobID string, q *QueryOptions) (*JobSummary, *QueryMeta,
}
func (j *Jobs) Dispatch(jobID string, meta map[string]string,
inputData []byte, q *WriteOptions) (*JobDispatchResponse, *WriteMeta, error) {
payload []byte, q *WriteOptions) (*JobDispatchResponse, *WriteMeta, error) {
var resp JobDispatchResponse
req := &JobDispatchRequest{
JobID: jobID,
Meta: meta,
InputData: inputData,
JobID: jobID,
Meta: meta,
Payload: payload,
}
wm, err := j.client.write("/v1/job/"+jobID+"/dispatch", req, &resp, q)
if err != nil {
@@ -202,9 +202,9 @@ type PeriodicConfig struct {
ProhibitOverlap bool
}
// DispatchConfig is used to configure the dispatch template
type DispatchConfig struct {
InputData string
// ConstructorConfig is used to configure the constructor job
type ConstructorConfig struct {
Payload string
MetaRequired []string
MetaOptional []string
}
@@ -223,8 +223,8 @@ type Job struct {
TaskGroups []*TaskGroup
Update *UpdateStrategy
Periodic *PeriodicConfig
Dispatch *DispatchConfig
InputData []byte
Constructor *ConstructorConfig
Payload []byte
Meta map[string]string
VaultToken string
Status string
@@ -436,9 +436,9 @@ type DesiredUpdates struct {
}
type JobDispatchRequest struct {
JobID string
InputData []byte
Meta map[string]string
JobID string
Payload []byte
Meta map[string]string
}
type JobDispatchResponse struct {

View File

@@ -143,8 +143,7 @@ type LogConfig struct {
// DispatchInputConfig configures how a task gets its input from a job dispatch
type DispatchInputConfig struct {
Stdin bool
File string
File string
}
// Task is a single process in a task group.