Documentation ¶
Index ¶
- Constants
- func MarshalRequest(v any) ([]machineryv1tasks.Arg, error)
- func MarshalResponse(v any) (string, error)
- func UnmarshalRequest(data string, v any) error
- func UnmarshalResponse(data []reflect.Value, v any) error
- func UnmarshalTaskResult(data any, v any) error
- type Config
- type DeletePeerResponse
- type DeleteTaskRequest
- type DeleteTaskResponse
- type GetTaskRequest
- type GetTaskResponse
- type GroupJobState
- type Job
- type MachineryLogger
- func (m *MachineryLogger) Fatal(args ...any)
- func (m *MachineryLogger) Fatalf(format string, args ...any)
- func (m *MachineryLogger) Fatalln(args ...any)
- func (m *MachineryLogger) Panic(args ...any)
- func (m *MachineryLogger) Panicf(format string, args ...any)
- func (m *MachineryLogger) Panicln(args ...any)
- func (m *MachineryLogger) Print(args ...any)
- func (m *MachineryLogger) Printf(format string, args ...any)
- func (m *MachineryLogger) Println(args ...any)
- type PreheatFailureTask
- type PreheatRequest
- type PreheatResponse
- type PreheatSuccessTask
- type Queue
Constants ¶
const ( GlobalQueue = Queue("global") SchedulersQueue = Queue("schedulers") )
Queue Name.
const ( // PreheatJob is the name of preheat job. PreheatJob = "preheat" // SyncPeersJob is the name of syncing peers job. SyncPeersJob = "sync_peers" // GetTaskJob is the name of getting task job. GetTaskJob = "get_task" // DeleteTaskJob is the name of deleting task job. DeleteTaskJob = "delete_task" )
Job Name.
const ( DefaultResultsExpireIn = 86400 DefaultRedisMaxIdle = 10 DefaultRedisIdleTimeout = 300 DefaultRedisReadTimeout = 60 DefaultRedisWriteTimeout = 60 DefaultRedisConnectTimeout = 60 )
Machinery server configuration.
Variables ¶
This section is empty.
Functions ¶
func MarshalRequest ¶
func MarshalRequest(v any) ([]machineryv1tasks.Arg, error)
func MarshalResponse ¶ added in v2.0.30
func UnmarshalRequest ¶
func UnmarshalTaskResult ¶ added in v2.1.57
Types ¶
type DeletePeerResponse ¶ added in v2.1.55
type DeletePeerResponse struct { Peer *resource.Peer `json:"peer"` Description string `json:"description"` }
DeletePeerResponse represents the response after attempting to delete a peer.
type DeleteTaskRequest ¶ added in v2.1.55
type DeleteTaskRequest struct { TaskID string `json:"task_id" validate:"required"` Timeout time.Duration `json:"timeout" validate:"omitempty"` }
DeleteTaskRequest defines the request parameters for deleting task.
type DeleteTaskResponse ¶ added in v2.1.55
type DeleteTaskResponse struct { SuccessPeers []*DeletePeerResponse `json:"success_peers"` FailurePeers []*DeletePeerResponse `json:"failure_peers"` }
DeleteTaskResponse defines the response parameters for deleting task.
type GetTaskRequest ¶ added in v2.1.55
type GetTaskRequest struct {
TaskID string `json:"task_id" validate:"required"`
}
GetTaskRequest defines the request parameters for getting task.
type GetTaskResponse ¶ added in v2.1.55
GetTaskResponse defines the response parameters for getting task.
type GroupJobState ¶
type Job ¶
type Job struct { Server *machinery.Server Worker *machinery.Worker Queue Queue }
func (*Job) GetGroupJobState ¶
func (t *Job) GetGroupJobState(name string, groupID string) (*GroupJobState, error)
type MachineryLogger ¶ added in v2.0.1
type MachineryLogger struct{}
func (*MachineryLogger) Fatal ¶ added in v2.0.1
func (m *MachineryLogger) Fatal(args ...any)
Fatal sends to logger.Fatal
func (*MachineryLogger) Fatalf ¶ added in v2.0.1
func (m *MachineryLogger) Fatalf(format string, args ...any)
Fatalf sends to logger.Fatalf
func (*MachineryLogger) Fatalln ¶ added in v2.0.1
func (m *MachineryLogger) Fatalln(args ...any)
Fatalln sends to logger.Fatal
func (*MachineryLogger) Panic ¶ added in v2.0.1
func (m *MachineryLogger) Panic(args ...any)
Panic sends to logger.Panic
func (*MachineryLogger) Panicf ¶ added in v2.0.1
func (m *MachineryLogger) Panicf(format string, args ...any)
Panicf sends to logger.Panic
func (*MachineryLogger) Panicln ¶ added in v2.0.1
func (m *MachineryLogger) Panicln(args ...any)
Panicln sends to logger.Panic
func (*MachineryLogger) Print ¶ added in v2.0.1
func (m *MachineryLogger) Print(args ...any)
Print sends to logger.Info
func (*MachineryLogger) Printf ¶ added in v2.0.1
func (m *MachineryLogger) Printf(format string, args ...any)
Printf sends to logger.Infof
func (*MachineryLogger) Println ¶ added in v2.0.1
func (m *MachineryLogger) Println(args ...any)
Println sends to logger.Info
type PreheatFailureTask ¶ added in v2.1.57
type PreheatFailureTask struct { URL string `json:"url"` Hostname string `json:"hostname"` IP string `json:"ip"` Description string `json:"description"` }
PreheatFailureTask defines the response parameters for preheating failed.
type PreheatRequest ¶
type PreheatRequest struct { URL string `json:"url" validate:"required,url"` Tag string `json:"tag" validate:"omitempty"` Digest string `json:"digest" validate:"omitempty"` FilteredQueryParams string `json:"filtered_query_params" validate:"omitempty"` Headers map[string]string `json:"headers" validate:"omitempty"` Application string `json:"application" validate:"omitempty"` Priority int32 `json:"priority" validate:"omitempty"` Scope string `json:"scope" validate:"omitempty"` ConcurrentCount int64 `json:"concurrent_count" validate:"omitempty"` Timeout time.Duration `json:"timeout" validate:"omitempty"` }
PreheatRequest defines the request parameters for preheating.
type PreheatResponse ¶
type PreheatResponse struct { SuccessTasks []*PreheatSuccessTask `json:"success_tasks"` FailureTasks []*PreheatFailureTask `json:"failure_tasks"` SchedulerClusterID uint `json:"scheduler_cluster_id"` }
PreheatResponse defines the response parameters for preheating.
type PreheatSuccessTask ¶ added in v2.1.57
type PreheatSuccessTask struct { URL string `json:"url"` Hostname string `json:"hostname"` IP string `json:"ip"` }
PreheatSuccessTask defines the response parameters for preheating successfully.