Documentation ¶
Index ¶
- Constants
- type Adapter
- type Bridge
- type DGAGraph
- type DGANode
- type Event
- type Executor
- type Graph
- type Listener
- type ListeningFn
- type Metadata
- type Node
- type Pipeline
- type PipelineImpl
- func (p *PipelineImpl) Cancel()
- func (p *PipelineImpl) Done() <-chan struct{}
- func (p *PipelineImpl) GetGraph() Graph
- func (p *PipelineImpl) Id() string
- func (p *PipelineImpl) Listening(fn Listener)
- func (p *PipelineImpl) Metadata() Metadata
- func (p *PipelineImpl) Notify()
- func (p *PipelineImpl) Run(ctx context.Context) error
- func (p *PipelineImpl) SetGraph(graph Graph)
- func (p *PipelineImpl) Status() string
- type Runtime
Constants ¶
View Source
const ( StatusRunning = "RUNNING" StatusFailed = "FAILED" StatusSuccess = "SUCCESS" StatusTerminate = "ABORTED" StatusPaused = "PAUSED" StatusUnknown = "UNKNOWN" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DGAGraph ¶
type DGAGraph struct {
// contains filtered or unexported fields
}
func NewDGAGraph ¶
func NewDGAGraph() *DGAGraph
type Event ¶
type Event string
流水线事件
var ( //监听事件 PipelineInit Event = "pipeline-init" // 流水线初始化 PipelineStart Event = "pipeline-start" // 流水线开始执行 PipelineFinish Event = "pipeline-finish" PipelineExecutorPrepare Event = "pipeline-executor-prepare" // 流水线执行器开始准备 PipelineExecutorPrepareDone Event = "pipeline-executor-prepare-done" // 流水线执行器准备完毕 PipelineNodeStart Event = "pipeline-node-start" PipelineNodeFinish Event = "pipeline-node-finish" )
type Executor ¶
type Executor interface { // Prepare 准备环境 Prepare(ctx context.Context) error // Destruction 销毁环境 Destruction(ctx context.Context) error }
Executor 执行器
type Listener ¶
type Listener interface { // 处理对应的事件将事件发生的对应的流水线和对应的事件作为参数传入 Handle(p Pipeline, event Event) // 获取当前注册的Event Events() []Event }
我们将整个流水线的运行过程中的事件抽象成对应的Event 这样我们就能再外部监听Event
type Pipeline ¶
type Pipeline interface { //ID 流水线的id Id() string //GetGraph 返回图结构 GetGraph() Graph //SetGraph 设置图结构 SetGraph(graph Graph) //Status 返回流水线的整体状态 Status() string //Metadata 返回流水线执行的源数据 Metadata() Metadata //Listening 流水线执行事件监听设置 Listening(listener Listener) //Done流水线是否执行完成 Done() <-chan struct{} //Run执行流水线 Run(ctx context.Context) error //Notify 执行的步骤通知流水线 Notify() //Cancel 取消流水线 Cancel() }
func NewPipeline ¶
type PipelineImpl ¶
type PipelineImpl struct {
// contains filtered or unexported fields
}
func (*PipelineImpl) Cancel ¶
func (p *PipelineImpl) Cancel()
func (*PipelineImpl) Listening ¶
func (p *PipelineImpl) Listening(fn Listener)
Listening 流水线执行事件监听设置
func (*PipelineImpl) Notify ¶
func (p *PipelineImpl) Notify()
type Runtime ¶
type Runtime interface { //获取流水线状态 Get(id string) (Pipeline, error) //取消运行中的流水线 Cancel(ctx context.Context, id string) error //执行异步流水线 RunAsync(ctx context.Context, id string, config string, listener Listener) (Pipeline, error) //执行同步流水线 RunSync(ctx context.Context, id string, config string, listener Listener) (Pipeline, error) //移除流水线记录 Rm(id string) //runtime已经执行完成 Done() chan struct{} //通知runtime Notify(data interface{}) error //反回runtime公共 Ctx() context.Context //停止后台处理 StopBackground() }
Runtime 运行时
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
executor
|
|
kubenetes/apis/agentcontroller/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
|
Package v1alpha1 is the v1alpha1 version of the API. |
kubenetes/generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
|
This package has the automatically generated fake clientset. |
kubenetes/generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
|
This package contains the scheme of the automatically generated clientset. |
kubenetes/generated/clientset/versioned/typed/agentcontroller/v1alpha1
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
kubenetes/generated/clientset/versioned/typed/agentcontroller/v1alpha1/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |
Click to show internal directories.
Click to hide internal directories.