Documentation
¶
Index ¶
- Variables
- func KillChildren(p *process.Process)
- type Booster
- func (b *Booster) GetApplyParam() *v2.ParamApply
- func (b *Booster) GetTaskID() string
- func (b *Booster) GetWorkersEnv() map[string]string
- func (b *Booster) ParseEvent(event *TaskEvent) error
- func (b *Booster) RegisterWork() error
- func (b *Booster) Run(ctx context.Context) (int, error)
- func (b *Booster) RunDegradeWorks(ctx context.Context) (int, error)
- func (b *Booster) RunWorks(ctx context.Context, event *TaskEvent) (int, error)
- func (b *Booster) SetSettings() error
- func (b *Booster) SetToolChain(f string) error
- func (b *Booster) SetToolChainWithJSON(tools *dcSDK.Toolchain) error
- func (b *Booster) StartControllerWork() error
- func (b *Booster) UnregisterWork() error
- func (b *Booster) Wait4TaskReady(ctx context.Context) (<-chan *TaskEvent, error)
- type ByModTime
- type ExtraItems
- type ExtraString
- type TaskEvent
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoLocal = fmt.Errorf("task degraded to local compiling and " + "exit according to the --no_local flag set") ErrCompile = fmt.Errorf("compile error, build exit") ErrBoosterNoRegistered = fmt.Errorf("booster no registered") ErrTaskPreparingTimeout = fmt.Errorf("task prepareing timeout") ErrContextCanceled = fmt.Errorf("context canceled") ErrWorkAlreadyRegistered = fmt.Errorf("work already registered") ErrWorkAlreadyUnregistered = fmt.Errorf("work already unregistered") ErrTaskApplyingFailed = fmt.Errorf("task applying failed") )
Functions ¶
func KillChildren ¶
KillChildren kill the children processes of given process
Types ¶
type Booster ¶
Booster describe the booster handler, which provides the methods and actions to build the params from flags and communicate with dist-controller
func NewBooster ¶
func NewBooster(config dcType.BoosterConfig) (*Booster, error)
NewBooster get a new booster instance
func (*Booster) GetApplyParam ¶
func (b *Booster) GetApplyParam() *v2.ParamApply
GetApplyParam return the apply param to controller
func (*Booster) GetWorkersEnv ¶
GetWorkersEnv get current worker env
func (*Booster) ParseEvent ¶
ParseEvent to parse task status event
func (*Booster) RunDegradeWorks ¶
RunDegradeWorks run the commands in local
func (*Booster) SetSettings ¶
SetSettings to set settings for this work
func (*Booster) SetToolChain ¶
SetToolChain set tool chain to controller
func (*Booster) SetToolChainWithJSON ¶
SetToolChainWithJSON set tool chain wiht json to controller
func (*Booster) StartControllerWork ¶
StartControllerWork to start the worker
func (*Booster) UnregisterWork ¶
UnregisterWork do the unregister
type ExtraItems ¶
type ExtraItems struct {
IOTimeoutSecs int `json:"io_timeout_secs"`
}
ExtraItems describe the info from extra-project-data
type ExtraString ¶
type ExtraString struct {
ExtraProjectData string `json:"extra_project_data"`
}
ExtraString describe the info from task-extra
type TaskEvent ¶
type TaskEvent struct { Info *dcSDK.WorkStatusDetail Err error }
TaskEvent describe the message of task info