disttask

package
v1.5.38 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteProject

func DeleteProject(req *restful.Request, resp *restful.Response)

DeleteProject handle the http request for deleting project.

func DeleteWhitelist

func DeleteWhitelist(req *restful.Request, resp *restful.Response)

DeleteWhitelist handle the http request for deleting whitelist.

func DeleteWorker

func DeleteWorker(req *restful.Request, resp *restful.Response)

DeleteWorker handle the http request for deleting worker.

func InitStorage

func InitStorage() (err error)

InitStorage After server init, the instances of manager, store ... etc. should be given into api handler.

func ListProject

func ListProject(req *restful.Request, resp *restful.Response)

ListProject handle the http request for listing project with conditions.

func ListTask

func ListTask(req *restful.Request, resp *restful.Response)

ListTask handle the http request for listing task with conditions.

func ListWhitelist

func ListWhitelist(req *restful.Request, resp *restful.Response)

ListWhitelist handle the http request for listing whitelist with conditions.

func ListWorkStats

func ListWorkStats(req *restful.Request, resp *restful.Response)

ListWorkStats handle the http request for listing work stats with conditions.

func ListWorker

func ListWorker(req *restful.Request, resp *restful.Response)

ListWorker handle the http request for listing worker with conditions.

func UpdateProject

func UpdateProject(req *restful.Request, resp *restful.Response)

UpdateProject handle the http request for updating project with some fields.

func UpdateWhitelist

func UpdateWhitelist(req *restful.Request, resp *restful.Response)

UpdateWhitelist handle the http request for updating whitelist with full fields.

func UpdateWorker

func UpdateWorker(req *restful.Request, resp *restful.Response)

UpdateWorker handle the http request for updating worker with full fields.

Types

type DeleteProjectType

type DeleteProjectType struct {
	OperatorType
}

DeleteProjectType describe the param of http request to delete project.

type DeleteWhitelistType

type DeleteWhitelistType struct {
	OperatorType
	Data []*engine.WhiteListKey `json:"data"`
}

DeleteWhitelistType describe the param of http request to delete whitelist.

type DeleteWorkerType

type DeleteWorkerType struct {
	OperatorType
}

DeleteWorkerType describe the param of http request to delete worker.

type OperatorType

type OperatorType struct {
	Operator string `json:"operator"`
}

OperatorType describe the http request's operator.

type UpdateProjectType

type UpdateProjectType struct {
	OperatorType
	Data    disttask.TableProjectSetting `json:"data"`
	RawData map[string]interface{}       `json:"-"`
}

UpdateProjectType describe the param of http request to update project.

func (*UpdateProjectType) CheckData

func (upt *UpdateProjectType) CheckData() error

CheckData check if the data is valid.

func (*UpdateProjectType) Load

func (upt *UpdateProjectType) Load(rawBody []byte) error

type UpdateWhitelistType

type UpdateWhitelistType struct {
	OperatorType
	Data []*disttask.TableWhitelist `json:"data"`
}

UpdateWhitelistType describe the param of http request to update whitelist.

type UpdateWorkerType

type UpdateWorkerType struct {
	OperatorType
	Data disttask.TableWorker `json:"data"`
}

UpdateWorkerType describe the param of http request to update worker.

Jump to

Keyboard shortcuts

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