Documentation
¶
Index ¶
- func HandleError(client *resty.Client, resp *resty.Response) error
- type BundleInfo
- type Client
- type ClientInterface
- type ClientOption
- type EdgeJobFetched
- type EdgeWorkerState
- type ExecuteTask
- type FetchJSONRequestBody
- type GeneralHTTPError
- type HTTPExceptionResponse
- type HTTPExceptionResponseDetail0
- type HTTPExceptionResponseDetail1
- type HTTPExceptionResponse_Detail
- func (t HTTPExceptionResponse_Detail) AsHTTPExceptionResponseDetail0() (HTTPExceptionResponseDetail0, error)
- func (t HTTPExceptionResponse_Detail) AsHTTPExceptionResponseDetail1() (HTTPExceptionResponseDetail1, error)
- func (t *HTTPExceptionResponse_Detail) FromHTTPExceptionResponseDetail0(v HTTPExceptionResponseDetail0) error
- func (t *HTTPExceptionResponse_Detail) FromHTTPExceptionResponseDetail1(v HTTPExceptionResponseDetail1) error
- func (t HTTPExceptionResponse_Detail) MarshalJSON() ([]byte, error)
- func (t *HTTPExceptionResponse_Detail) MergeHTTPExceptionResponseDetail0(v HTTPExceptionResponseDetail0) error
- func (t *HTTPExceptionResponse_Detail) MergeHTTPExceptionResponseDetail1(v HTTPExceptionResponseDetail1) error
- func (t *HTTPExceptionResponse_Detail) UnmarshalJSON(b []byte) error
- type HTTPValidationError
- type Job
- type JobCollectionResponse
- type JobsClient
- type LogsClient
- type MaintenanceRequest
- type PushLogsBody
- type PushLogsJSONRequestBody
- type RegisterJSONRequestBody
- type SetStateJSONRequestBody
- type TaskInstance
- type TaskInstanceState
- type UpdateQueuesJSONRequestBody
- type ValidationError
- type ValidationErrorLoc0
- type ValidationErrorLoc1
- type ValidationError_Loc_Item
- func (t ValidationError_Loc_Item) AsValidationErrorLoc0() (ValidationErrorLoc0, error)
- func (t ValidationError_Loc_Item) AsValidationErrorLoc1() (ValidationErrorLoc1, error)
- func (t *ValidationError_Loc_Item) FromValidationErrorLoc0(v ValidationErrorLoc0) error
- func (t *ValidationError_Loc_Item) FromValidationErrorLoc1(v ValidationErrorLoc1) error
- func (t ValidationError_Loc_Item) MarshalJSON() ([]byte, error)
- func (t *ValidationError_Loc_Item) MergeValidationErrorLoc0(v ValidationErrorLoc0) error
- func (t *ValidationError_Loc_Item) MergeValidationErrorLoc1(v ValidationErrorLoc1) error
- func (t *ValidationError_Loc_Item) UnmarshalJSON(b []byte) error
- type Worker
- type WorkerClient
- type WorkerCollectionResponse
- type WorkerQueueUpdateBody
- type WorkerQueuesBody
- type WorkerRegistrationReturn
- type WorkerSetStateReturn
- type WorkerStateBody
- type WorkerStateBodySysinfo0
- type WorkerStateBodySysinfo1
- type WorkerStateBody_Sysinfo_AdditionalProperties
- func (t WorkerStateBody_Sysinfo_AdditionalProperties) AsWorkerStateBodySysinfo0() (WorkerStateBodySysinfo0, error)
- func (t WorkerStateBody_Sysinfo_AdditionalProperties) AsWorkerStateBodySysinfo1() (WorkerStateBodySysinfo1, error)
- func (t *WorkerStateBody_Sysinfo_AdditionalProperties) FromWorkerStateBodySysinfo0(v WorkerStateBodySysinfo0) error
- func (t *WorkerStateBody_Sysinfo_AdditionalProperties) FromWorkerStateBodySysinfo1(v WorkerStateBodySysinfo1) error
- func (t WorkerStateBody_Sysinfo_AdditionalProperties) MarshalJSON() ([]byte, error)
- func (t *WorkerStateBody_Sysinfo_AdditionalProperties) MergeWorkerStateBodySysinfo0(v WorkerStateBodySysinfo0) error
- func (t *WorkerStateBody_Sysinfo_AdditionalProperties) MergeWorkerStateBodySysinfo1(v WorkerStateBodySysinfo1) error
- func (t *WorkerStateBody_Sysinfo_AdditionalProperties) UnmarshalJSON(b []byte) error
- type WorkerSysinfo0
- type WorkerSysinfo1
- type Worker_Sysinfo_AdditionalProperties
- func (t Worker_Sysinfo_AdditionalProperties) AsWorkerSysinfo0() (WorkerSysinfo0, error)
- func (t Worker_Sysinfo_AdditionalProperties) AsWorkerSysinfo1() (WorkerSysinfo1, error)
- func (t *Worker_Sysinfo_AdditionalProperties) FromWorkerSysinfo0(v WorkerSysinfo0) error
- func (t *Worker_Sysinfo_AdditionalProperties) FromWorkerSysinfo1(v WorkerSysinfo1) error
- func (t Worker_Sysinfo_AdditionalProperties) MarshalJSON() ([]byte, error)
- func (t *Worker_Sysinfo_AdditionalProperties) MergeWorkerSysinfo0(v WorkerSysinfo0) error
- func (t *Worker_Sysinfo_AdditionalProperties) MergeWorkerSysinfo1(v WorkerSysinfo1) error
- func (t *Worker_Sysinfo_AdditionalProperties) UnmarshalJSON(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BundleInfo ¶
BundleInfo Schema for telling task which bundle to run with.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
*resty.Client
RequestMiddleware []resty.RequestMiddleware
}
Client which conforms to the OpenAPI3 specification for this service.
func (*Client) Jobs ¶
func (c *Client) Jobs() JobsClient
func (*Client) Logs ¶
func (c *Client) Logs() LogsClient
func (*Client) Worker ¶
func (c *Client) Worker() WorkerClient
type ClientInterface ¶
type ClientInterface interface {
// Jobs deals with all the Jobs endpoints
Jobs() JobsClient
// Logs deals with all the Logs endpoints
Logs() LogsClient
// Worker deals with all the Worker endpoints
Worker() WorkerClient
}
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (ClientInterface, error)
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithClient ¶
func WithClient(r *resty.Client) ClientOption
WithClient allows overriding the default resty.Client, which is automatically created using http.Client.
If this is used the `server` base URL argument passed in will not be respected anymore
func WithEdgeAPIJWTKey ¶
func WithEdgeAPIJWTKey(key []byte) ClientOption
func WithRequestMiddleware ¶
func WithRequestMiddleware(mw resty.RequestMiddleware) ClientOption
WithRequestMiddleware allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
func WithRoundTripper ¶
func WithRoundTripper(transport http.RoundTripper) ClientOption
WithRoundTripper method sets custom http.Transport or any http.RoundTripper compatible interface implementation in the Resty client
type EdgeJobFetched ¶
type EdgeJobFetched struct {
// Command Execute the given Task.
Command ExecuteTask `json:"command"`
// ConcurrencySlots Number of concurrency slots the job requires.
ConcurrencySlots int `json:"concurrency_slots"`
// DagId Identifier of the DAG to which the task belongs.
DagId string `json:"dag_id"`
// MapIndex For dynamically mapped tasks the mapping number, -1 if the task is not mapped.
MapIndex int `json:"map_index"`
// RunId Run ID of the DAG execution.
RunId string `json:"run_id"`
// TaskId Task name in the DAG.
TaskId string `json:"task_id"`
// TryNumber The number of attempt to execute this task.
TryNumber int `json:"try_number"`
}
EdgeJobFetched Job that is to be executed on the edge worker.
type EdgeWorkerState ¶
type EdgeWorkerState string
EdgeWorkerState Status of a Edge Worker instance.
const ( EdgeWorkerStateIdle EdgeWorkerState = "idle" EdgeWorkerStateMaintenanceExit EdgeWorkerState = "maintenance exit" EdgeWorkerStateMaintenanceMode EdgeWorkerState = "maintenance mode" EdgeWorkerStateMaintenancePending EdgeWorkerState = "maintenance pending" EdgeWorkerStateMaintenanceRequest EdgeWorkerState = "maintenance request" EdgeWorkerStateOffline EdgeWorkerState = "offline" EdgeWorkerStateOfflineMaintenance EdgeWorkerState = "offline maintenance" EdgeWorkerStateRunning EdgeWorkerState = "running" EdgeWorkerStateShutdownRequest EdgeWorkerState = "shutdown request" EdgeWorkerStateStarting EdgeWorkerState = "starting" EdgeWorkerStateTerminating EdgeWorkerState = "terminating" EdgeWorkerStateUnknown EdgeWorkerState = "unknown" )
Defines values for EdgeWorkerState.
type ExecuteTask ¶
type ExecuteTask struct {
// BundleInfo Schema for telling task which bundle to run with.
BundleInfo BundleInfo `json:"bundle_info"`
DagRelPath string `json:"dag_rel_path"`
LogPath *string `json:"log_path"`
// Ti Schema for TaskInstance with minimal required fields needed for Executors and Task SDK.
Ti TaskInstance `json:"ti"`
Token string `json:"token"`
Type *string `json:"type,omitempty"`
}
ExecuteTask Execute the given Task.
type FetchJSONRequestBody ¶
type FetchJSONRequestBody = WorkerQueuesBody
FetchJSONRequestBody defines body for Fetch for application/json ContentType.
type GeneralHTTPError ¶
func (GeneralHTTPError) Error ¶
func (e GeneralHTTPError) Error() string
type HTTPExceptionResponse ¶
type HTTPExceptionResponse struct {
Detail HTTPExceptionResponse_Detail `json:"detail"`
}
HTTPExceptionResponse HTTPException Model used for error response.
type HTTPExceptionResponseDetail0 ¶
type HTTPExceptionResponseDetail0 = string
HTTPExceptionResponseDetail0 defines model for .
type HTTPExceptionResponseDetail1 ¶
type HTTPExceptionResponseDetail1 map[string]interface{}
HTTPExceptionResponseDetail1 defines model for .
type HTTPExceptionResponse_Detail ¶
type HTTPExceptionResponse_Detail struct {
// contains filtered or unexported fields
}
HTTPExceptionResponse_Detail defines model for HTTPExceptionResponse.Detail.
func (HTTPExceptionResponse_Detail) AsHTTPExceptionResponseDetail0 ¶
func (t HTTPExceptionResponse_Detail) AsHTTPExceptionResponseDetail0() (HTTPExceptionResponseDetail0, error)
AsHTTPExceptionResponseDetail0 returns the union data inside the HTTPExceptionResponse_Detail as a HTTPExceptionResponseDetail0
func (HTTPExceptionResponse_Detail) AsHTTPExceptionResponseDetail1 ¶
func (t HTTPExceptionResponse_Detail) AsHTTPExceptionResponseDetail1() (HTTPExceptionResponseDetail1, error)
AsHTTPExceptionResponseDetail1 returns the union data inside the HTTPExceptionResponse_Detail as a HTTPExceptionResponseDetail1
func (*HTTPExceptionResponse_Detail) FromHTTPExceptionResponseDetail0 ¶
func (t *HTTPExceptionResponse_Detail) FromHTTPExceptionResponseDetail0(v HTTPExceptionResponseDetail0) error
FromHTTPExceptionResponseDetail0 overwrites any union data inside the HTTPExceptionResponse_Detail as the provided HTTPExceptionResponseDetail0
func (*HTTPExceptionResponse_Detail) FromHTTPExceptionResponseDetail1 ¶
func (t *HTTPExceptionResponse_Detail) FromHTTPExceptionResponseDetail1(v HTTPExceptionResponseDetail1) error
FromHTTPExceptionResponseDetail1 overwrites any union data inside the HTTPExceptionResponse_Detail as the provided HTTPExceptionResponseDetail1
func (HTTPExceptionResponse_Detail) MarshalJSON ¶
func (t HTTPExceptionResponse_Detail) MarshalJSON() ([]byte, error)
func (*HTTPExceptionResponse_Detail) MergeHTTPExceptionResponseDetail0 ¶
func (t *HTTPExceptionResponse_Detail) MergeHTTPExceptionResponseDetail0(v HTTPExceptionResponseDetail0) error
MergeHTTPExceptionResponseDetail0 performs a merge with any union data inside the HTTPExceptionResponse_Detail, using the provided HTTPExceptionResponseDetail0
func (*HTTPExceptionResponse_Detail) MergeHTTPExceptionResponseDetail1 ¶
func (t *HTTPExceptionResponse_Detail) MergeHTTPExceptionResponseDetail1(v HTTPExceptionResponseDetail1) error
MergeHTTPExceptionResponseDetail1 performs a merge with any union data inside the HTTPExceptionResponse_Detail, using the provided HTTPExceptionResponseDetail1
func (*HTTPExceptionResponse_Detail) UnmarshalJSON ¶
func (t *HTTPExceptionResponse_Detail) UnmarshalJSON(b []byte) error
type HTTPValidationError ¶
type HTTPValidationError struct {
Detail *[]ValidationError `json:"detail,omitempty"`
}
HTTPValidationError defines model for HTTPValidationError.
type Job ¶
type Job struct {
// DagId Identifier of the DAG to which the task belongs.
DagId string `json:"dag_id"`
// EdgeWorker The worker processing the job during execution.
EdgeWorker *string `json:"edge_worker"`
// LastUpdate Last heartbeat of the job.
LastUpdate *time.Time `json:"last_update"`
// MapIndex For dynamically mapped tasks the mapping number, -1 if the task is not mapped.
MapIndex int `json:"map_index"`
// Queue Queue for which the task is scheduled/running.
Queue string `json:"queue"`
// QueuedDttm When the job was queued.
QueuedDttm *time.Time `json:"queued_dttm"`
// RunId Run ID of the DAG execution.
RunId string `json:"run_id"`
// State All possible states that a Task Instance can be in.
//
// Note that None is also allowed, so always use this in a type hint with Optional.
State TaskInstanceState `json:"state"`
// TaskId Task name in the DAG.
TaskId string `json:"task_id"`
// TryNumber The number of attempt to execute this task.
TryNumber int `json:"try_number"`
}
Job Details of the job sent to the scheduler.
type JobCollectionResponse ¶
type JobCollectionResponse struct {
Jobs []Job `json:"jobs"`
TotalEntries int `json:"total_entries"`
}
JobCollectionResponse Job Collection serializer.
type JobsClient ¶
type JobsClient interface {
// Fetch a job to execute on the edge worker.
Fetch(ctx context.Context, workerName string, body *WorkerQueuesBody) (*struct {
// Command Execute the given Task.
Command ExecuteTask `json:"command"`
// ConcurrencySlots Number of concurrency slots the job requires.
ConcurrencySlots int `json:"concurrency_slots"`
// DagId Identifier of the DAG to which the task belongs.
DagId string `json:"dag_id"`
// MapIndex For dynamically mapped tasks the mapping number, -1 if the task is not mapped.
MapIndex int `json:"map_index"`
// RunId Run ID of the DAG execution.
RunId string `json:"run_id"`
// TaskId Task name in the DAG.
TaskId string `json:"task_id"`
// TryNumber The number of attempt to execute this task.
TryNumber int `json:"try_number"`
}, error)
// FetchResponse is a lower level version of [Fetch] and provides access to the raw [resty.Response]
FetchResponse(ctx context.Context, workerName string, body *WorkerQueuesBody) (*resty.Response, error)
// Update the state of a job running on the edge worker.
State(ctx context.Context, dagId string, taskId string, runId string, tryNumber int, mapIndex int, state TaskInstanceState) (*interface{}, error)
// StateResponse is a lower level version of [State] and provides access to the raw [resty.Response]
StateResponse(ctx context.Context, dagId string, taskId string, runId string, tryNumber int, mapIndex int, state TaskInstanceState) (*resty.Response, error)
}
type LogsClient ¶
type LogsClient interface {
// Push an incremental log chunk from Edge Worker to central site.
Push(ctx context.Context, dagId string, taskId string, runId string, tryNumber int, mapIndex int, body *PushLogsBody) (*interface{}, error)
// PushResponse is a lower level version of [Push] and provides access to the raw [resty.Response]
PushResponse(ctx context.Context, dagId string, taskId string, runId string, tryNumber int, mapIndex int, body *PushLogsBody) (*resty.Response, error)
// contains filtered or unexported methods
}
type MaintenanceRequest ¶
type MaintenanceRequest struct {
// MaintenanceComment Comment describing the maintenance reason.
MaintenanceComment string `json:"maintenance_comment"`
}
MaintenanceRequest Request body for maintenance operations.
type PushLogsBody ¶
type PushLogsBody struct {
// LogChunkData Log chunk data as incremental log text.
LogChunkData string `json:"log_chunk_data"`
// LogChunkTime Time of the log chunk at point of sending.
LogChunkTime time.Time `json:"log_chunk_time"`
}
PushLogsBody Incremental new log content from worker.
type PushLogsJSONRequestBody ¶
type PushLogsJSONRequestBody = PushLogsBody
PushLogsJSONRequestBody defines body for PushLogs for application/json ContentType.
type RegisterJSONRequestBody ¶
type RegisterJSONRequestBody = WorkerStateBody
RegisterJSONRequestBody defines body for Register for application/json ContentType.
type SetStateJSONRequestBody ¶
type SetStateJSONRequestBody = WorkerStateBody
SetStateJSONRequestBody defines body for SetState for application/json ContentType.
type TaskInstance ¶
type TaskInstance struct {
ContextCarrier *map[string]interface{} `json:"context_carrier"`
DagId string `json:"dag_id"`
DagVersionId openapi_types.UUID `json:"dag_version_id"`
Id openapi_types.UUID `json:"id"`
MapIndex *int `json:"map_index,omitempty"`
ParentContextCarrier *map[string]interface{} `json:"parent_context_carrier"`
PoolSlots int `json:"pool_slots"`
PriorityWeight int `json:"priority_weight"`
Queue string `json:"queue"`
RunId string `json:"run_id"`
TaskId string `json:"task_id"`
TryNumber int `json:"try_number"`
}
TaskInstance Schema for TaskInstance with minimal required fields needed for Executors and Task SDK.
type TaskInstanceState ¶
type TaskInstanceState string
TaskInstanceState All possible states that a Task Instance can be in.
Note that None is also allowed, so always use this in a type hint with Optional.
const ( TaskInstanceStateDeferred TaskInstanceState = "deferred" TaskInstanceStateFailed TaskInstanceState = "failed" TaskInstanceStateQueued TaskInstanceState = "queued" TaskInstanceStateRemoved TaskInstanceState = "removed" TaskInstanceStateRestarting TaskInstanceState = "restarting" TaskInstanceStateRunning TaskInstanceState = "running" TaskInstanceStateScheduled TaskInstanceState = "scheduled" TaskInstanceStateSkipped TaskInstanceState = "skipped" TaskInstanceStateSuccess TaskInstanceState = "success" TaskInstanceStateUpForReschedule TaskInstanceState = "up_for_reschedule" TaskInstanceStateUpForRetry TaskInstanceState = "up_for_retry" TaskInstanceStateUpstreamFailed TaskInstanceState = "upstream_failed" )
Defines values for TaskInstanceState.
type UpdateQueuesJSONRequestBody ¶
type UpdateQueuesJSONRequestBody = WorkerQueueUpdateBody
UpdateQueuesJSONRequestBody defines body for UpdateQueues for application/json ContentType.
type ValidationError ¶
type ValidationError struct {
Loc []ValidationError_Loc_Item `json:"loc"`
Msg string `json:"msg"`
Type string `json:"type"`
}
ValidationError defines model for ValidationError.
type ValidationErrorLoc0 ¶
type ValidationErrorLoc0 = string
ValidationErrorLoc0 defines model for .
type ValidationError_Loc_Item ¶
type ValidationError_Loc_Item struct {
// contains filtered or unexported fields
}
ValidationError_Loc_Item defines model for ValidationError.loc.Item.
func (ValidationError_Loc_Item) AsValidationErrorLoc0 ¶
func (t ValidationError_Loc_Item) AsValidationErrorLoc0() (ValidationErrorLoc0, error)
AsValidationErrorLoc0 returns the union data inside the ValidationError_Loc_Item as a ValidationErrorLoc0
func (ValidationError_Loc_Item) AsValidationErrorLoc1 ¶
func (t ValidationError_Loc_Item) AsValidationErrorLoc1() (ValidationErrorLoc1, error)
AsValidationErrorLoc1 returns the union data inside the ValidationError_Loc_Item as a ValidationErrorLoc1
func (*ValidationError_Loc_Item) FromValidationErrorLoc0 ¶
func (t *ValidationError_Loc_Item) FromValidationErrorLoc0(v ValidationErrorLoc0) error
FromValidationErrorLoc0 overwrites any union data inside the ValidationError_Loc_Item as the provided ValidationErrorLoc0
func (*ValidationError_Loc_Item) FromValidationErrorLoc1 ¶
func (t *ValidationError_Loc_Item) FromValidationErrorLoc1(v ValidationErrorLoc1) error
FromValidationErrorLoc1 overwrites any union data inside the ValidationError_Loc_Item as the provided ValidationErrorLoc1
func (ValidationError_Loc_Item) MarshalJSON ¶
func (t ValidationError_Loc_Item) MarshalJSON() ([]byte, error)
func (*ValidationError_Loc_Item) MergeValidationErrorLoc0 ¶
func (t *ValidationError_Loc_Item) MergeValidationErrorLoc0(v ValidationErrorLoc0) error
MergeValidationErrorLoc0 performs a merge with any union data inside the ValidationError_Loc_Item, using the provided ValidationErrorLoc0
func (*ValidationError_Loc_Item) MergeValidationErrorLoc1 ¶
func (t *ValidationError_Loc_Item) MergeValidationErrorLoc1(v ValidationErrorLoc1) error
MergeValidationErrorLoc1 performs a merge with any union data inside the ValidationError_Loc_Item, using the provided ValidationErrorLoc1
func (*ValidationError_Loc_Item) UnmarshalJSON ¶
func (t *ValidationError_Loc_Item) UnmarshalJSON(b []byte) error
type Worker ¶
type Worker struct {
// FirstOnline When the worker was first online.
FirstOnline *time.Time `json:"first_online"`
// JobsActive Number of active jobs the worker is running.
JobsActive *int `json:"jobs_active,omitempty"`
// LastHeartbeat When the worker last sent a heartbeat.
LastHeartbeat *time.Time `json:"last_heartbeat"`
// MaintenanceComments Comments about the maintenance state of the worker.
MaintenanceComments *string `json:"maintenance_comments"`
// Queues List of queues the worker is pulling jobs from. If not provided, worker pulls from all queues.
Queues *[]string `json:"queues"`
// State Status of a Edge Worker instance.
State EdgeWorkerState `json:"state"`
// Sysinfo System information of the worker.
Sysinfo map[string]Worker_Sysinfo_AdditionalProperties `json:"sysinfo"`
// WorkerName Name of the worker.
WorkerName string `json:"worker_name"`
}
Worker Details of the worker state sent to the scheduler.
type WorkerClient ¶
type WorkerClient interface {
UpdateQueues(ctx context.Context, workerName string, body *WorkerQueueUpdateBody) (*interface{}, error)
// UpdateQueuesResponse is a lower level version of [UpdateQueues] and provides access to the raw [resty.Response]
UpdateQueuesResponse(ctx context.Context, workerName string, body *WorkerQueueUpdateBody) (*resty.Response, error)
// Set state of worker and returns the current assigned queues.
SetState(ctx context.Context, workerName string, body *WorkerStateBody) (*WorkerSetStateReturn, error)
// SetStateResponse is a lower level version of [SetState] and provides access to the raw [resty.Response]
SetStateResponse(ctx context.Context, workerName string, body *WorkerStateBody) (*resty.Response, error)
// Register a new worker to the backend.
Register(ctx context.Context, workerName string, body *WorkerStateBody) (*WorkerRegistrationReturn, error)
// RegisterResponse is a lower level version of [Register] and provides access to the raw [resty.Response]
RegisterResponse(ctx context.Context, workerName string, body *WorkerStateBody) (*resty.Response, error)
}
type WorkerCollectionResponse ¶
type WorkerCollectionResponse struct {
TotalEntries int `json:"total_entries"`
Workers []Worker `json:"workers"`
}
WorkerCollectionResponse Worker Collection serializer.
type WorkerQueueUpdateBody ¶
type WorkerQueueUpdateBody struct {
// NewQueues Additional queues to be added to worker.
NewQueues *[]string `json:"new_queues"`
// RemoveQueues Queues to remove from worker.
RemoveQueues *[]string `json:"remove_queues"`
}
WorkerQueueUpdateBody Changed queues for the worker.
type WorkerQueuesBody ¶
type WorkerQueuesBody struct {
// FreeConcurrency Number of free concurrency slots on the worker.
FreeConcurrency int `json:"free_concurrency"`
// Queues List of queues the worker is pulling jobs from. If not provided, worker pulls from all queues.
Queues *[]string `json:"queues"`
}
WorkerQueuesBody Queues that a worker supports to run jobs on.
type WorkerRegistrationReturn ¶
type WorkerRegistrationReturn struct {
// LastUpdate Time of the last update of the worker.
LastUpdate time.Time `json:"last_update"`
}
WorkerRegistrationReturn The return class for the worker registration.
type WorkerSetStateReturn ¶
type WorkerSetStateReturn struct {
// MaintenanceComments Comments about the maintenance state of the worker.
MaintenanceComments *string `json:"maintenance_comments"`
// Queues List of queues the worker is pulling jobs from. If not provided, worker pulls from all queues.
Queues *[]string `json:"queues"`
// State Status of a Edge Worker instance.
State EdgeWorkerState `json:"state"`
}
WorkerSetStateReturn The return class for the worker set state.
type WorkerStateBody ¶
type WorkerStateBody struct {
// JobsActive Number of active jobs the worker is running.
JobsActive *int `json:"jobs_active,omitempty"`
// MaintenanceComments Comments about the maintenance state of the worker.
MaintenanceComments *string `json:"maintenance_comments"`
// Queues List of queues the worker is pulling jobs from. If not provided, worker pulls from all queues.
Queues *[]string `json:"queues"`
// State Status of a Edge Worker instance.
State EdgeWorkerState `json:"state"`
// Sysinfo System information of the worker.
Sysinfo map[string]WorkerStateBody_Sysinfo_AdditionalProperties `json:"sysinfo"`
}
WorkerStateBody Details of the worker state sent to the scheduler.
type WorkerStateBodySysinfo0 ¶
type WorkerStateBodySysinfo0 = string
WorkerStateBodySysinfo0 defines model for .
type WorkerStateBodySysinfo1 ¶
type WorkerStateBodySysinfo1 = int
WorkerStateBodySysinfo1 defines model for .
type WorkerStateBody_Sysinfo_AdditionalProperties ¶
type WorkerStateBody_Sysinfo_AdditionalProperties struct {
// contains filtered or unexported fields
}
WorkerStateBody_Sysinfo_AdditionalProperties defines model for WorkerStateBody.sysinfo.AdditionalProperties.
func (WorkerStateBody_Sysinfo_AdditionalProperties) AsWorkerStateBodySysinfo0 ¶
func (t WorkerStateBody_Sysinfo_AdditionalProperties) AsWorkerStateBodySysinfo0() (WorkerStateBodySysinfo0, error)
AsWorkerStateBodySysinfo0 returns the union data inside the WorkerStateBody_Sysinfo_AdditionalProperties as a WorkerStateBodySysinfo0
func (WorkerStateBody_Sysinfo_AdditionalProperties) AsWorkerStateBodySysinfo1 ¶
func (t WorkerStateBody_Sysinfo_AdditionalProperties) AsWorkerStateBodySysinfo1() (WorkerStateBodySysinfo1, error)
AsWorkerStateBodySysinfo1 returns the union data inside the WorkerStateBody_Sysinfo_AdditionalProperties as a WorkerStateBodySysinfo1
func (*WorkerStateBody_Sysinfo_AdditionalProperties) FromWorkerStateBodySysinfo0 ¶
func (t *WorkerStateBody_Sysinfo_AdditionalProperties) FromWorkerStateBodySysinfo0(v WorkerStateBodySysinfo0) error
FromWorkerStateBodySysinfo0 overwrites any union data inside the WorkerStateBody_Sysinfo_AdditionalProperties as the provided WorkerStateBodySysinfo0
func (*WorkerStateBody_Sysinfo_AdditionalProperties) FromWorkerStateBodySysinfo1 ¶
func (t *WorkerStateBody_Sysinfo_AdditionalProperties) FromWorkerStateBodySysinfo1(v WorkerStateBodySysinfo1) error
FromWorkerStateBodySysinfo1 overwrites any union data inside the WorkerStateBody_Sysinfo_AdditionalProperties as the provided WorkerStateBodySysinfo1
func (WorkerStateBody_Sysinfo_AdditionalProperties) MarshalJSON ¶
func (t WorkerStateBody_Sysinfo_AdditionalProperties) MarshalJSON() ([]byte, error)
func (*WorkerStateBody_Sysinfo_AdditionalProperties) MergeWorkerStateBodySysinfo0 ¶
func (t *WorkerStateBody_Sysinfo_AdditionalProperties) MergeWorkerStateBodySysinfo0(v WorkerStateBodySysinfo0) error
MergeWorkerStateBodySysinfo0 performs a merge with any union data inside the WorkerStateBody_Sysinfo_AdditionalProperties, using the provided WorkerStateBodySysinfo0
func (*WorkerStateBody_Sysinfo_AdditionalProperties) MergeWorkerStateBodySysinfo1 ¶
func (t *WorkerStateBody_Sysinfo_AdditionalProperties) MergeWorkerStateBodySysinfo1(v WorkerStateBodySysinfo1) error
MergeWorkerStateBodySysinfo1 performs a merge with any union data inside the WorkerStateBody_Sysinfo_AdditionalProperties, using the provided WorkerStateBodySysinfo1
func (*WorkerStateBody_Sysinfo_AdditionalProperties) UnmarshalJSON ¶
func (t *WorkerStateBody_Sysinfo_AdditionalProperties) UnmarshalJSON(b []byte) error
type Worker_Sysinfo_AdditionalProperties ¶
type Worker_Sysinfo_AdditionalProperties struct {
// contains filtered or unexported fields
}
Worker_Sysinfo_AdditionalProperties defines model for Worker.sysinfo.AdditionalProperties.
func (Worker_Sysinfo_AdditionalProperties) AsWorkerSysinfo0 ¶
func (t Worker_Sysinfo_AdditionalProperties) AsWorkerSysinfo0() (WorkerSysinfo0, error)
AsWorkerSysinfo0 returns the union data inside the Worker_Sysinfo_AdditionalProperties as a WorkerSysinfo0
func (Worker_Sysinfo_AdditionalProperties) AsWorkerSysinfo1 ¶
func (t Worker_Sysinfo_AdditionalProperties) AsWorkerSysinfo1() (WorkerSysinfo1, error)
AsWorkerSysinfo1 returns the union data inside the Worker_Sysinfo_AdditionalProperties as a WorkerSysinfo1
func (*Worker_Sysinfo_AdditionalProperties) FromWorkerSysinfo0 ¶
func (t *Worker_Sysinfo_AdditionalProperties) FromWorkerSysinfo0(v WorkerSysinfo0) error
FromWorkerSysinfo0 overwrites any union data inside the Worker_Sysinfo_AdditionalProperties as the provided WorkerSysinfo0
func (*Worker_Sysinfo_AdditionalProperties) FromWorkerSysinfo1 ¶
func (t *Worker_Sysinfo_AdditionalProperties) FromWorkerSysinfo1(v WorkerSysinfo1) error
FromWorkerSysinfo1 overwrites any union data inside the Worker_Sysinfo_AdditionalProperties as the provided WorkerSysinfo1
func (Worker_Sysinfo_AdditionalProperties) MarshalJSON ¶
func (t Worker_Sysinfo_AdditionalProperties) MarshalJSON() ([]byte, error)
func (*Worker_Sysinfo_AdditionalProperties) MergeWorkerSysinfo0 ¶
func (t *Worker_Sysinfo_AdditionalProperties) MergeWorkerSysinfo0(v WorkerSysinfo0) error
MergeWorkerSysinfo0 performs a merge with any union data inside the Worker_Sysinfo_AdditionalProperties, using the provided WorkerSysinfo0
func (*Worker_Sysinfo_AdditionalProperties) MergeWorkerSysinfo1 ¶
func (t *Worker_Sysinfo_AdditionalProperties) MergeWorkerSysinfo1(v WorkerSysinfo1) error
MergeWorkerSysinfo1 performs a merge with any union data inside the Worker_Sysinfo_AdditionalProperties, using the provided WorkerSysinfo1
func (*Worker_Sysinfo_AdditionalProperties) UnmarshalJSON ¶
func (t *Worker_Sysinfo_AdditionalProperties) UnmarshalJSON(b []byte) error