Documentation ¶
Index ¶
Constants ¶
View Source
const ( VersionV1 = "v1" PathV1 = prefix + VersionV1 )
define vars
View Source
const ( OSWindows = "windows" CheckShaderJSONFileTickMillisecs = 10 TryRunJobsTickMillisecs = 10 MaxJobExecuteWaitSecs = 259200 // 3600*24*3 CheckJobsExecuteTickSecs = 60 DefaultMaxParallelJobs = 240 // ok for most machines MaxApplyResourceWaitSecs = 120 // default stage_timeout is 60 CheckOutputEnvJSONTickMillisecs = 100 CheckApplyCmdTickSecs = 5 CheckOldFilesTickSecs = 600 CheckCommitSuicideSecs = 20 CheckQuitTicksecs = 1 DevOPSProcessTreeKillKey = "DEVOPS_DONT_KILL_PROCESS_TREE" )
const vars
Variables ¶
View Source
var ( ErrorNoActionsToRun = fmt.Errorf("not found any action to execute") ErrorOverMaxTime = fmt.Errorf("execute over max wait seconds") ErrorInvalidWorkID = fmt.Errorf("not found valid work id") ErrorInvalidJSON = fmt.Errorf("json invalid") ErrorFailedApplyResource = fmt.Errorf("failed to apply resource after wait seconds") ErrorApplyCmdExitUnexpedted = fmt.Errorf("apply resource cmd exit unexpected") ErrorFailedLaunchController = fmt.Errorf("failed to launch controller") ErrorSignalInt = fmt.Errorf("signal of SIGINT") ErrorSignalTerm = fmt.Errorf("signal of SIGTERM") ErrorSignalOthers = fmt.Errorf("signal of others") ErrorUnknown = fmt.Errorf("unknown error") ErrorProjectSettingNotExisted = fmt.Errorf("not found project setting file") ErrorContorllerNil = fmt.Errorf("controller sdk is nil") ErrorBoosterNil = fmt.Errorf("booster is nil") ErrContextCanceled = fmt.Errorf("context canceled") ErrInitHTTPHandle = fmt.Errorf("failed to init http handle") )
define errors
View Source
var (
IdleKeepSecs = 100 //
)
vars
Functions ¶
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor define dist executor
type HTTPHandle ¶
type HTTPHandle struct {
// contains filtered or unexported fields
}
HTTPHandle : http handle
func NewHTTPHandle ¶
func NewHTTPHandle(mgr *ShaderTool) (*HTTPHandle, error)
NewHTTPHandle : return new http handle func NewHTTPHandle(conf *config.ServerConfig, mgr *ShaderTool) (*HTTPHandle, error) {
func (*HTTPHandle) GetActions ¶
func (a *HTTPHandle) GetActions() []*httpserver.Action
GetActions : Get V1 actions
type RestResponse ¶
type RestResponse struct { Resp *restful.Response HTTPCode int Data interface{} ErrCode commonTypes.ServerErrCode Message string Extra map[string]interface{} WrapFunc func([]byte) []byte }
RestResponse : data struct for http response
type ShaderTool ¶
type ShaderTool struct {
// contains filtered or unexported fields
}
ShaderTool describe the shader tool handler
func NewShaderTool ¶
func NewShaderTool(flagsparam *common.Flags) *ShaderTool
NewShaderTool get a new ShaderTool
func (*ShaderTool) ListenAndServeWithDynamicPort ¶
func (h *ShaderTool) ListenAndServeWithDynamicPort() error
func (*ShaderTool) ReleaseResource ¶
func (h *ShaderTool) ReleaseResource()
ReleaseResource release resource after some idle duration
Click to show internal directories.
Click to hide internal directories.