Documentation ¶
Index ¶
Constants ¶
const ( JobStateCreated = "created" // this is the default value of state in a new job JobStateFailed = "failed" )
Possible values of a job's state
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Job ¶
type Job struct { ID string `bson:"_id" json:"id"` LastUpdated time.Time `bson:"last_updated" json:"last_updated"` Links *JobLinks `bson:"links" json:"links"` NumberOfTasks int `bson:"number_of_tasks" json:"number_of_tasks"` ReindexCompleted time.Time `bson:"reindex_completed" json:"reindex_completed"` ReindexFailed time.Time `bson:"reindex_failed" json:"reindex_failed"` ReindexStarted time.Time `bson:"reindex_started" json:"reindex_started"` SearchIndexName string `bson:"search_index_name" json:"search_index_name"` State string `bson:"state" json:"state"` TotalSearchDocuments int `bson:"total_search_documents" json:"total_search_documents"` TotalInsertedSearchDocuments int `bson:"total_inserted_search_documents" json:"total_inserted_search_documents"` }
Job represents a job metadata model and json representation for API
type JobLinks ¶
JobLinks is a type that contains links to the endpoints for returning a specific job (self), and the tasks that it contains (tasks), respectively.
type Jobs ¶ added in v0.4.0
type Jobs struct { Count int `bson:"count,omitempty" json:"count"` JobList []Job `bson:"jobs,omitempty" json:"jobs"` Limit int `bson:"limit,omitempty" json:"limit"` Offset int `bson:"offset,omitempty" json:"offset"` TotalCount int `bson:"total_count,omitempty" json:"total_count"` }
Jobs represents an array of Job resources and json representation for API
type ReindexRequested ¶ added in v0.15.0
type ReindexRequested struct { JobID string `avro:"job_id"` SearchIndex string `avro:"search_index"` TraceID string `avro:"trace_id"` }
ReindexRequested provides an avro structure for a Reindex Requested event
type Task ¶ added in v0.9.0
type Task struct { JobID string `bson:"job_id" json:"job_id"` LastUpdated time.Time `bson:"last_updated" json:"last_updated"` Links *TaskLinks `bson:"links" json:"links"` NumberOfDocuments int `bson:"number_of_documents" json:"number_of_documents"` TaskName string `bson:"task_name" json:"task_name"` }
Task represents a job metadata model and json representation for API
type TaskLinks ¶ added in v0.9.0
TaskLinks is a type that contains links to the endpoints for returning a specific task (self), and the job that it is part of (job), respectively.
type TaskToCreate ¶ added in v0.9.0
type TaskToCreate struct { TaskName string `json:"task_name"` NumberOfDocuments int `json:"number_of_documents"` }
TaskToCreate is a type that contains the details required for creating a Task type.
type Tasks ¶ added in v0.12.0
type Tasks struct { Count int `bson:"count,omitempty" json:"count"` TaskList []Task `bson:"jobs,omitempty" json:"tasks"` Limit int `bson:"limit,omitempty" json:"limit"` Offset int `bson:"offset,omitempty" json:"offset"` TotalCount int `bson:"total_count,omitempty" json:"total_count"` }
Tasks represents an array of Task resources and json representation for API