models

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobActionRequest

type JobActionRequest struct {
	Action string `json:"action"`
}

JobActionRequest defines for triggering job action like stop/cancel.

type JobData

type JobData struct {
	Name       string       `json:"name"`
	Parameters Parameters   `json:"parameters"`
	Metadata   *JobMetadata `json:"metadata"`
	StatusHook string       `json:"status_hook"`
}

JobData keeps the basic info.

type JobMetadata

type JobMetadata struct {
	JobKind       string `json:"kind"`
	ScheduleDelay uint64 `json:"schedule_delay,omitempty"`
	Cron          string `json:"cron_spec,omitempty"`
	IsUnique      bool   `json:"unique"`
}

JobMetadata stores the metadata of job.

type JobPoolStats

type JobPoolStats struct {
	Pools []*JobPoolStatsData `json:"worker_pools"`
}

JobPoolStats represents the healthy and status of all the running worker pools.

type JobPoolStatsData

type JobPoolStatsData struct {
	WorkerPoolID string   `json:"worker_pool_id"`
	StartedAt    int64    `json:"started_at"`
	HeartbeatAt  int64    `json:"heartbeat_at"`
	JobNames     []string `json:"job_names"`
	Concurrency  uint     `json:"concurrency"`
	Status       string   `json:"status"`
}

JobPoolStatsData represent the healthy and status of the worker pool.

type JobRequest

type JobRequest struct {
	Job *JobData `json:"job"`
}

JobRequest is the request of launching a job.

type JobStatData

type JobStatData struct {
	JobID                string   `json:"id"`
	Status               string   `json:"status"`
	JobName              string   `json:"name"`
	JobKind              string   `json:"kind"`
	IsUnique             bool     `json:"unique"`
	RefLink              string   `json:"ref_link,omitempty"`
	CronSpec             string   `json:"cron_spec,omitempty"`
	EnqueueTime          int64    `json:"enqueue_time"`
	UpdateTime           int64    `json:"update_time"`
	RunAt                int64    `json:"run_at,omitempty"`
	CheckIn              string   `json:"check_in,omitempty"`
	CheckInAt            int64    `json:"check_in_at,omitempty"`
	DieAt                int64    `json:"die_at,omitempty"`
	HookStatus           string   `json:"hook_status,omitempty"`
	Executions           []string `json:"executions,omitempty"`      // For the jobs like periodic jobs, which may execute multiple times
	UpstreamJobID        string   `json:"upstream_job_id,omitempty"` // Ref the upstream job if existing
	IsMultipleExecutions bool     `json:"multiple_executions"`       // Indicate if the job has subsequent executions
}

JobStatData keeps the stats of job

type JobStats

type JobStats struct {
	Stats *JobStatData `json:"job"`
}

JobStats keeps the result of job launching.

type JobStatusChange

type JobStatusChange struct {
	JobID    string       `json:"job_id"`
	Status   string       `json:"status"`
	CheckIn  string       `json:"check_in,omitempty"`
	Metadata *JobStatData `json:"metadata,omitempty"`
}

JobStatusChange is designed for reporting the status change via hook.

type Message

type Message struct {
	Event string
	Data  interface{} // generic format
}

Message is designed for sub/pub messages

type Parameters

type Parameters map[string]interface{}

Parameters for job execution.

Jump to

Keyboard shortcuts

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