echo

package
v0.0.0-...-6ac6f58 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEcho

func NewEcho() (handler.Handler, error)

NewEcho return echo handler

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) FinalExecute

func (c *Echo) FinalExecute([]string)

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) InitExtra

func (c *Echo) InitExtra(extra []byte)

InitExtra receive the extra data after resources applied.

func (*Echo) InitSandbox

func (c *Echo) InitSandbox(sandbox *dcSyscall.Sandbox)

InitSandbox to init sandbox

func (*Echo) LocalExecute

func (c *Echo) LocalExecute(command []string) (int, error)

LocalExecute execute local cmd by this handle

func (*Echo) LocalExecuteNeed

func (c *Echo) LocalExecuteNeed(command []string) bool

LocalExecuteNeed decode whether execute local cmd by this handle

func (*Echo) LocalLockWeight

func (c *Echo) LocalLockWeight(command []string) int32

LocalLockWeight decide local-execute lock weight, default 1

func (*Echo) NeedRemoteResource

func (c *Echo) NeedRemoteResource(command []string) bool

NeedRemoteResource check whether this command need remote resource

func (*Echo) OnRemoteFail

func (c *Echo) OnRemoteFail(command []string) (*dcSDK.BKDistCommand, error)

OnRemoteFail give chance to try other way if failed to remote execute

func (*Echo) PostExecute

func (c *Echo) PostExecute(r *dcSDK.BKDistResult) error

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, error)

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

func (c *Echo) PreExecuteNeedLock(command []string) bool

PreExecuteNeedLock decide whether should lock when executor do the pre-process

func (*Echo) PreLockWeight

func (c *Echo) PreLockWeight(command []string) int32

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

func (c *Echo) RemoteRetryTimes() int

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

func (c *Echo) ResultExtra() []byte

ResultExtra return the extra data for recording in project info.

Jump to

Keyboard shortcuts

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