Documentation
¶
Index ¶
- Constants
- func MonitorShutdown(triggerCh <-chan struct{}, handlers ...ShutdownHandler) <-chan struct{}
- func ReqContext() context.Context
- func RunPythonScript(scriptPath ...string) (string, error)
- func SaveMcsFileByUrlToFile(fileName, mcsUrl string) error
- func StreamPythonScriptOutput(wg *sync.WaitGroup, scriptPath ...string)
- type BasicResponse
- type ShutdownHandler
- type StopFunc
Constants ¶
View Source
const ( SuccessCode = 200 ServerError = 500 GetLocationError = 3000 GetCpAccountError = 3001 GeResourceError = 3002 JsonError = 4000 BadParamError = 4001 SignatureError = 4002 SpaceParseResourceUriError = 4003 CheckResourcesError = 4004 SpaceCheckWhiteListError = 4005 NoAvailableResourcesError = 4006 FoundJobEntityError = 4007 NotFoundJobEntityError = 4008 SaveJobEntityError = 4009 FoundWhiteListError = 4010 ProofParamError = 7001 ProofReadLogError = 7002 ProofError = 7003 UbiTaskParamError = 8001 UbiTaskContractError = 8002 FoundTaskEntityError = 8003 SaveTaskEntityError = 8004 SubmitProofError = 8005 )
Variables ¶
This section is empty.
Functions ¶
func MonitorShutdown ¶
func MonitorShutdown(triggerCh <-chan struct{}, handlers ...ShutdownHandler) <-chan struct{}
func ReqContext ¶
func RunPythonScript ¶
func SaveMcsFileByUrlToFile ¶
Types ¶
type BasicResponse ¶
type BasicResponse struct { Status string `json:"status"` Code int `json:"code"` Data interface{} `json:"data,omitempty"` Message string `json:"message,omitempty"` }
func CreateErrorResponse ¶
func CreateErrorResponse(code int, errMsg ...string) BasicResponse
func CreateSuccessResponse ¶
func CreateSuccessResponse(_data interface{}) BasicResponse
type ShutdownHandler ¶
Click to show internal directories.
Click to hide internal directories.