Documentation
¶
Index ¶
- func NewEcho() (handler.Handler, error)
- type Echo
- func (c *Echo) CanExecuteWithLocalIdleResource(command []string) bool
- func (c *Echo) FinalExecute([]string)
- func (c *Echo) GetFilterRules() ([]dcSDK.FilterRuleItem, error)
- func (c *Echo) GetPreloadConfig(config dcType.BoosterConfig) (*dcSDK.PreloadConfig, error)
- func (c *Echo) InitExtra(extra []byte)
- func (c *Echo) InitSandbox(sandbox *dcSyscall.Sandbox)
- func (c *Echo) LocalExecute(command []string) dcType.BKDistCommonError
- func (c *Echo) LocalExecuteNeed(command []string) bool
- func (c *Echo) LocalLockWeight(command []string) int32
- func (c *Echo) NeedRemoteResource(command []string) bool
- func (c *Echo) NeedRetryOnRemoteFail(command []string) bool
- func (c *Echo) OnRemoteFail(command []string) (*dcSDK.BKDistCommand, dcType.BKDistCommonError)
- func (c *Echo) PostExecute(r *dcSDK.BKDistResult) dcType.BKDistCommonError
- func (c *Echo) PostExecuteNeedLock(result *dcSDK.BKDistResult) bool
- func (c *Echo) PostLockWeight(result *dcSDK.BKDistResult) int32
- func (c *Echo) PostWork(config *dcType.BoosterConfig) error
- func (c *Echo) PreExecute(command []string) (*dcSDK.BKDistCommand, dcType.BKDistCommonError)
- func (c *Echo) PreExecuteNeedLock(command []string) bool
- func (c *Echo) PreLockWeight(command []string) int32
- func (c *Echo) PreWork(config *dcType.BoosterConfig) error
- func (c *Echo) RemoteRetryTimes() int
- func (c *Echo) RenderArgs(config dcType.BoosterConfig, originArgs string) string
- func (c *Echo) ResultExtra() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Echo ¶
type Echo struct {
// contains filtered or unexported fields
}
Echo describe a handler which conside the echo parameters as input/output files, these files will be sent to worker and return by worker.
func (*Echo) CanExecuteWithLocalIdleResource ¶
func (*Echo) FinalExecute ¶
FinalExecute provide a chance to do process before the process exit.
func (*Echo) GetFilterRules ¶
func (c *Echo) GetFilterRules() ([]dcSDK.FilterRuleItem, error)
GetFilterRules return the sending file filter rules.
func (*Echo) GetPreloadConfig ¶
func (c *Echo) GetPreloadConfig(config dcType.BoosterConfig) (*dcSDK.PreloadConfig, error)
GetPreloadConfig open the preload config file and return the settings.
func (*Echo) InitSandbox ¶
InitSandbox to init sandbox
func (*Echo) LocalExecute ¶
func (c *Echo) LocalExecute(command []string) dcType.BKDistCommonError
LocalExecute execute local cmd by this handle
func (*Echo) LocalExecuteNeed ¶
LocalExecuteNeed decode whether execute local cmd by this handle
func (*Echo) LocalLockWeight ¶
LocalLockWeight decide local-execute lock weight, default 1
func (*Echo) NeedRemoteResource ¶
NeedRemoteResource check whether this command need remote resource
func (*Echo) NeedRetryOnRemoteFail ¶
NeedRetryOnRemoteFail check whether need retry on remote fail
func (*Echo) OnRemoteFail ¶
func (c *Echo) OnRemoteFail(command []string) (*dcSDK.BKDistCommand, dcType.BKDistCommonError)
OnRemoteFail give chance to try other way if failed to remote execute
func (*Echo) PostExecute ¶
func (c *Echo) PostExecute(r *dcSDK.BKDistResult) dcType.BKDistCommonError
PostExecute do the post-process in one executor command. PostExecute should check the DistResult and judge whether the remote processing succeeded. Also PostExecute should manages the output message.
func (*Echo) PostExecuteNeedLock ¶
func (c *Echo) PostExecuteNeedLock(result *dcSDK.BKDistResult) bool
PostExecuteNeedLock decide whether should lock when executor do the post-process
func (*Echo) PostLockWeight ¶
func (c *Echo) PostLockWeight(result *dcSDK.BKDistResult) int32
PostLockWeight decide post-execute lock weight, default 1
func (*Echo) PostWork ¶
func (c *Echo) PostWork(config *dcType.BoosterConfig) error
PostWork provide a chance to do some process after all processes finish.
func (*Echo) PreExecute ¶
func (c *Echo) PreExecute(command []string) (*dcSDK.BKDistCommand, dcType.BKDistCommonError)
PreExecute do the pre-process in one executor command. PreExecute should analyse the input command and generate the DistCommand to send to remote.
func (*Echo) PreExecuteNeedLock ¶
PreExecuteNeedLock decide whether should lock when executor do the pre-process
func (*Echo) PreLockWeight ¶
PreLockWeight decide pre-execute lock weight, default 1
func (*Echo) PreWork ¶
func (c *Echo) PreWork(config *dcType.BoosterConfig) error
PreWork provide a chance to do some process before all processes begin.
func (*Echo) RemoteRetryTimes ¶
RemoteRetryTimes will return the remote retry times
func (*Echo) RenderArgs ¶
func (c *Echo) RenderArgs(config dcType.BoosterConfig, originArgs string) string
RenderArgs receive the origin command from user, and decide whether it should be rendered before execution.
func (*Echo) ResultExtra ¶
ResultExtra return the extra data for recording in project info.