Documentation ¶
Index ¶
- Constants
- func EmitPipelineInstanceEvent(p *spec.Pipeline, userID string)
- func EmitPipelineStreamEvent(pipelineID uint64, events []*apistructs.PipelineEvent)
- func EmitTaskEvent(task *spec.PipelineTask, p *spec.Pipeline)
- func EmitTaskRuntimeEvent(task *spec.PipelineTask, p *spec.Pipeline)
- func Initialize(bdl *bundle.Bundle, wsClient *websocket.Publisher, dbClient *dbclient.Client)
- type DefaultEvent
- type Event
- type EventKind
- type EventManager
- type HandleDB
- type HandleDingDing
- type HandleHTTP
- type HandleWebSocket
- type HandleWebhook
- type Hook
- type HookType
- type IdentityInfo
- type PipelineEvent
- func (e *PipelineEvent) Content() interface{}
- func (e *PipelineEvent) HandleDB() error
- func (e *PipelineEvent) HandleDingDing() error
- func (e *PipelineEvent) HandleHTTP() error
- func (e *PipelineEvent) HandleWebSocket() error
- func (e *PipelineEvent) HandleWebhook() error
- func (e *PipelineEvent) Header() apistructs.EventHeader
- func (e *PipelineEvent) Kind() EventKind
- func (e *PipelineEvent) Sender() string
- func (e *PipelineEvent) String() string
- type PipelineStreamEvent
- type PipelineTaskEvent
- func (e *PipelineTaskEvent) Content() interface{}
- func (e *PipelineTaskEvent) HandleWebSocket() error
- func (e *PipelineTaskEvent) HandleWebhook() error
- func (e *PipelineTaskEvent) Header() apistructs.EventHeader
- func (e *PipelineTaskEvent) Kind() EventKind
- func (e *PipelineTaskEvent) Sender() string
- func (e *PipelineTaskEvent) String() string
- type PipelineTaskRuntimeEvent
- func (e *PipelineTaskRuntimeEvent) Content() interface{}
- func (e *PipelineTaskRuntimeEvent) HandleWebSocket() error
- func (e *PipelineTaskRuntimeEvent) HandleWebhook() error
- func (e *PipelineTaskRuntimeEvent) Header() apistructs.EventHeader
- func (e *PipelineTaskRuntimeEvent) Kind() EventKind
- func (e *PipelineTaskRuntimeEvent) Sender() string
- func (e *PipelineTaskRuntimeEvent) String() string
- type WSPipelineStatusUpdatePayload
- type WSPipelineTaskRuntimeIDUpdatePayload
- type WSPipelineTaskStatusUpdatePayload
Constants ¶
View Source
const ( // EventLevelNormal represents information only and will not cause any problems EventLevelNormal string = "Normal" // EventLevelWarning represents events are to warn that something might go wrong EventLevelWarning string = "Warning" )
Valid values for event levels (new level could be added in future)
View Source
const (
SenderPipeline = "pipeline"
)
View Source
const (
WSTypePipelineStatusUpdate = "PIPELINE_STATUS_UPDATE"
)
View Source
const (
WSTypePipelineTaskRuntimeIDUpdate = "PIPELINE_TASK_RUNTIME_ID_UPDATE"
)
View Source
const (
WSTypePipelineTaskStatusUpdate = "PIPELINE_TASK_STATUS_UPDATE"
)
Variables ¶
This section is empty.
Functions ¶
func EmitPipelineStreamEvent ¶
func EmitPipelineStreamEvent(pipelineID uint64, events []*apistructs.PipelineEvent)
func EmitTaskEvent ¶
func EmitTaskEvent(task *spec.PipelineTask, p *spec.Pipeline)
func EmitTaskRuntimeEvent ¶
func EmitTaskRuntimeEvent(task *spec.PipelineTask, p *spec.Pipeline)
Types ¶
type DefaultEvent ¶
type DefaultEvent struct {
// contains filtered or unexported fields
}
func (*DefaultEvent) HandleDB ¶
func (*DefaultEvent) HandleDB() error
func (*DefaultEvent) HandleDingDing ¶
func (*DefaultEvent) HandleDingDing() error
func (*DefaultEvent) HandleHTTP ¶
func (*DefaultEvent) HandleHTTP() error
func (*DefaultEvent) HandleWebSocket ¶
func (*DefaultEvent) HandleWebSocket() error
func (*DefaultEvent) HandleWebhook ¶
func (*DefaultEvent) HandleWebhook() error
type Event ¶
type Event interface { Kind() EventKind Header() apistructs.EventHeader Sender() string Content() interface{} String() string Hook }
type EventManager ¶
type EventManager struct {
// contains filtered or unexported fields
}
type HandleDingDing ¶
type HandleDingDing interface{ HandleDingDing() error }
type HandleHTTP ¶
type HandleHTTP interface{ HandleHTTP() error }
type HandleWebSocket ¶
type HandleWebSocket interface{ HandleWebSocket() error }
type HandleWebhook ¶
type HandleWebhook interface{ HandleWebhook() error }
type Hook ¶
type Hook interface { HandleWebhook HandleWebSocket HandleDingDing HandleHTTP HandleDB }
type IdentityInfo ¶
type PipelineEvent ¶
type PipelineEvent struct { DefaultEvent IdentityInfo EventHeader apistructs.EventHeader Pipeline *spec.Pipeline }
func (*PipelineEvent) Content ¶
func (e *PipelineEvent) Content() interface{}
func (*PipelineEvent) HandleDB ¶
func (e *PipelineEvent) HandleDB() error
func (*PipelineEvent) HandleDingDing ¶
func (e *PipelineEvent) HandleDingDing() error
func (*PipelineEvent) HandleHTTP ¶
func (e *PipelineEvent) HandleHTTP() error
func (*PipelineEvent) HandleWebSocket ¶
func (e *PipelineEvent) HandleWebSocket() error
func (*PipelineEvent) HandleWebhook ¶
func (e *PipelineEvent) HandleWebhook() error
func (*PipelineEvent) Header ¶
func (e *PipelineEvent) Header() apistructs.EventHeader
func (*PipelineEvent) Kind ¶
func (e *PipelineEvent) Kind() EventKind
func (*PipelineEvent) Sender ¶
func (e *PipelineEvent) Sender() string
func (*PipelineEvent) String ¶
func (e *PipelineEvent) String() string
type PipelineStreamEvent ¶
type PipelineStreamEvent struct { DefaultEvent IdentityInfo EventHeader apistructs.EventHeader PipelineID uint64 Events []*apistructs.PipelineEvent }
func (*PipelineStreamEvent) Content ¶
func (e *PipelineStreamEvent) Content() interface{}
func (*PipelineStreamEvent) HandleDB ¶
func (e *PipelineStreamEvent) HandleDB() error
func (*PipelineStreamEvent) Header ¶
func (e *PipelineStreamEvent) Header() apistructs.EventHeader
func (*PipelineStreamEvent) Kind ¶
func (e *PipelineStreamEvent) Kind() EventKind
func (*PipelineStreamEvent) Sender ¶
func (e *PipelineStreamEvent) Sender() string
func (*PipelineStreamEvent) String ¶
func (e *PipelineStreamEvent) String() string
type PipelineTaskEvent ¶
type PipelineTaskEvent struct { DefaultEvent IdentityInfo EventHeader apistructs.EventHeader Task *spec.PipelineTask Pipeline *spec.Pipeline }
func (*PipelineTaskEvent) Content ¶
func (e *PipelineTaskEvent) Content() interface{}
func (*PipelineTaskEvent) HandleWebSocket ¶
func (e *PipelineTaskEvent) HandleWebSocket() error
func (*PipelineTaskEvent) HandleWebhook ¶
func (e *PipelineTaskEvent) HandleWebhook() error
func (*PipelineTaskEvent) Header ¶
func (e *PipelineTaskEvent) Header() apistructs.EventHeader
func (*PipelineTaskEvent) Kind ¶
func (e *PipelineTaskEvent) Kind() EventKind
func (*PipelineTaskEvent) Sender ¶
func (e *PipelineTaskEvent) Sender() string
func (*PipelineTaskEvent) String ¶
func (e *PipelineTaskEvent) String() string
type PipelineTaskRuntimeEvent ¶
type PipelineTaskRuntimeEvent struct { DefaultEvent IdentityInfo EventHeader apistructs.EventHeader Task *spec.PipelineTask Pipeline *spec.Pipeline RuntimeID string }
func (*PipelineTaskRuntimeEvent) Content ¶
func (e *PipelineTaskRuntimeEvent) Content() interface{}
func (*PipelineTaskRuntimeEvent) HandleWebSocket ¶
func (e *PipelineTaskRuntimeEvent) HandleWebSocket() error
func (*PipelineTaskRuntimeEvent) HandleWebhook ¶
func (e *PipelineTaskRuntimeEvent) HandleWebhook() error
func (*PipelineTaskRuntimeEvent) Header ¶
func (e *PipelineTaskRuntimeEvent) Header() apistructs.EventHeader
func (*PipelineTaskRuntimeEvent) Kind ¶
func (e *PipelineTaskRuntimeEvent) Kind() EventKind
func (*PipelineTaskRuntimeEvent) Sender ¶
func (e *PipelineTaskRuntimeEvent) Sender() string
func (*PipelineTaskRuntimeEvent) String ¶
func (e *PipelineTaskRuntimeEvent) String() string
type WSPipelineStatusUpdatePayload ¶
type WSPipelineStatusUpdatePayload struct { Status apistructs.PipelineStatus `json:"status"` CostTimeSec int64 `json:"costTimeSec"` // contains filtered or unexported fields }
type WSPipelineTaskStatusUpdatePayload ¶
type WSPipelineTaskStatusUpdatePayload struct { PipelineTaskID uint64 `json:"pipelineTaskID"` Status apistructs.PipelineStatus `json:"status"` Result apistructs.PipelineTaskResult `json:"result"` CostTimeSec int64 `json:"costTimeSec"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.