Documentation ¶
Index ¶
- Constants
- type Base
- type Flow
- func (f *Flow) DeletePipeline(id string) error
- func (f *Flow) GetPipelineByID(id string, needNode, needPipelineRun bool) (*Pipeline, error)
- func (f *Flow) NewPipeline(args *PipelineArgs) error
- func (f *Flow) NewPipelineRun(args *PipelineRunArgs) error
- func (f *Flow) UpdatePipelineRemark(id, remark string) error
- func (f *Flow) UpdatePipelineTopic(id string, topic string) error
- type FlowOption
- type MysqlOption
- type Node
- type NodeArgs
- type NodeData
- type Pipeline
- type PipelineArgs
- type PipelineRun
- type PipelineRunArgs
- type RedisOption
- type StorageOption
Constants ¶
View Source
const ( PipelineRunStatusProcessing = "processing" PipelineRunStatusPending = "pending" PipelineRunStatusSuccess = "success" PipelineRunStatusFailed = "failed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flow ¶
type Flow struct {
// contains filtered or unexported fields
}
func NewFlow ¶
func NewFlow(storage *StorageOption, opts ...FlowOption) *Flow
func (*Flow) DeletePipeline ¶
DeletePipeline will delete the pipeline and all nodes in it.
func (*Flow) GetPipelineByID ¶
func (*Flow) NewPipeline ¶
func (f *Flow) NewPipeline(args *PipelineArgs) error
func (*Flow) NewPipelineRun ¶
func (f *Flow) NewPipelineRun(args *PipelineRunArgs) error
func (*Flow) UpdatePipelineRemark ¶
type FlowOption ¶
type FlowOption func(*Flow)
func WithContext ¶
func WithContext(ctx context.Context) FlowOption
func WithDelay ¶
func WithDelay(d time.Duration) FlowOption
type MysqlOption ¶
type Node ¶
type Node struct { Base Name string `json:"name"` Sequence int `gorm:"index:idx_seq_pipe" json:"sequence"` PipelineID string `gorm:"index:idx_seq_pipe" json:"pipeline_id"` PrevNodeID string `json:"prev_node_id"` NextNodeID string `json:"next_node_id"` Template string `json:"template"` Pipeline *Pipeline `json:"pipeline"` NodeData []NodeData `json:"node_data"` }
type PipelineArgs ¶
type PipelineRun ¶
type PipelineRun struct { Base PipelineID string `gorm:"index:idx_pipe_stage" json:"pipeline_id"` Stage string `gorm:"idnex:idx_pipe_stage" json:"stage"` //node ID Status string `json:"status"` // processing, pending, success, failed Pipeline *Pipeline `json:"pipeline"` NodeData []NodeData `json:"node_data"` }
type PipelineRunArgs ¶
type PipelineRunArgs struct {
PipelineID string
}
type StorageOption ¶
type StorageOption struct { Mysql *MysqlOption Redis *RedisOption }
Click to show internal directories.
Click to hide internal directories.