Documentation ¶
Index ¶
Constants ¶
View Source
const (
CtxKeyTasks = iota
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PipelineBaseTunePoint ¶
type PipelineBaseTunePoint struct{}
func (PipelineBaseTunePoint) Type ¶
func (p PipelineBaseTunePoint) Type() TuneType
type SDK ¶
type TaskBaseTunePoint ¶
type TaskBaseTunePoint struct{}
func (TaskBaseTunePoint) Type ¶
func (p TaskBaseTunePoint) Type() TuneType
type TuneChain ¶
type TuneChain []TunePoint
TuneChain 表示一组有序 TunePoint
func (TuneChain) Handle ¶
func (chain TuneChain) Handle(ctx *TuneContext) error
Handle 根据上下文调用 TuneChain
type TuneContext ¶
func (*TuneContext) PutKV ¶
func (ctx *TuneContext) PutKV(k, v interface{})
func (*TuneContext) TryGet ¶
func (ctx *TuneContext) TryGet(k interface{}) (interface{}, bool)
type TuneGroup ¶
type TuneGroup map[TuneType]map[TuneTrigger]TuneChain
TuneGroup 保存所有类型不同触发时机下的调用链
func (TuneGroup) GetTuneChainByTypeAndTrigger ¶
func (g TuneGroup) GetTuneChainByTypeAndTrigger(pointType TuneType, trigger TuneTrigger) TuneChain
GetTuneChainByTypeAndTrigger 根据 类型 和 触发时机 返回 调用链
type TunePoint ¶
type TunePoint interface { Type() TuneType Name() string Handle(*TuneContext) error }
TunePoint 调音点
type TuneTrigger ¶
type TuneTrigger string
TuneTrigger 调节的触发时机
const ( TuneTriggerPipelineBeforeExec TuneTrigger = "pipeline_before_exec" TuneTriggerPipelineInQueuePrecheckBeforePop TuneTrigger = "pipeline_in_queue_precheck_before_pop" TuneTriggerPipelineAfterExec TuneTrigger = "pipeline_after_exec" TuneTriggerTaskBeforeExec TuneTrigger = "task_before_exec" TuneTriggerTaskAfterExec TuneTrigger = "task_after_exec" TuneTriggerTaskBeforePrepare TuneTrigger = "task_before_prepare" TuneTriggerTaskAfterPrepare TuneTrigger = "task_after_prepare" TuneTriggerTaskBeforeCreate TuneTrigger = "task_before_create" TuneTriggerTaskAfterCreate TuneTrigger = "task_after_create" TuneTriggerTaskBeforeStart TuneTrigger = "task_before_start" TuneTriggerTaskAfterStart TuneTrigger = "task_after_start" TuneTriggerTaskBeforeQueue TuneTrigger = "task_before_queue" TuneTriggerTaskAfterQueue TuneTrigger = "task_after_queue" TuneTriggerTaskBeforeWait TuneTrigger = "task_before_wait" TuneTriggerTaskAfterWait TuneTrigger = "task_after_wait" )
Click to show internal directories.
Click to hide internal directories.