Documentation
¶
Index ¶
- type Lineage
- type LineageModel
- type Module
- func (m *Module) Events(ctx context.Context, obj *model.WorkflowLineage) ([]*mdk.Event, error)
- func (m *Module) FieldResolvers() map[string]any
- func (m *Module) GetWorkflowLineage(ctx context.Context, id string) (*model.WorkflowLineage, error)
- func (m *Module) HealthMutation(ctx context.Context) (string, error)
- func (m *Module) HealthQuery(ctx context.Context) (string, error)
- func (m *Module) ID() string
- func (m *Module) Init(ctx context.Context, rt mdk.Runtime) error
- func (m *Module) ListLineages(ctx context.Context) ([]*model.WorkflowLineage, error)
- func (m *Module) Models() []any
- func (m *Module) Mutations() map[string]any
- func (m *Module) Projector() mdk.Projector
- func (m *Module) Queries() map[string]any
- func (m *Module) RelatedLineages(ctx context.Context, obj *model.WorkflowLineage) ([]*model.WorkflowLineage, error)
- func (m *Module) Routes() []mdk.Route
- func (m *Module) Shutdown(ctx context.Context) error
- type Projector
- func (p *Projector) GetLineage(id string) (*Lineage, error)
- func (p *Projector) GetRelatedLineages(ctx context.Context, id string) ([]*Lineage, error)
- func (p *Projector) ListLineages() []registry.LineageData
- func (p *Projector) QueryLineages(filter func(registry.LineageData) bool) []registry.LineageData
- func (p *Projector) SetDB(database *gorm.DB)
- func (p *Projector) Start(ctx context.Context) error
- type StepLineage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lineage ¶
type Lineage struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
State string `json:"state"`
StartedAt time.Time `json:"started_at"`
EndedAt *time.Time `json:"ended_at,omitempty"`
Steps []*StepLineage `json:"steps"`
Events []eventbus.Event `json:"events"`
Error string `json:"error,omitempty"`
}
Lineage represents the execution history of a workflow.
func (*Lineage) GetEndedAt ¶
func (*Lineage) GetStartedAt ¶
type LineageModel ¶
type LineageModel struct {
ID string `gorm:"primaryKey"`
Name string
Version string
State string
StartedAt time.Time
EndedAt *time.Time
Error string
Steps string `gorm:"type:text"` // Serialized JSON of []*StepLineage
Events string `gorm:"type:text"` // Serialized JSON of []eventbus.Event
CreatedAt time.Time
UpdatedAt time.Time
}
LineageModel GORM model for persisting lineages to database.
func (LineageModel) TableName ¶
func (LineageModel) TableName() string
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module implements the mdk.Module interface.
func (*Module) FieldResolvers ¶
func (*Module) GetWorkflowLineage ¶
func (*Module) HealthMutation ¶
func (*Module) ListLineages ¶
func (*Module) RelatedLineages ¶
func (m *Module) RelatedLineages(ctx context.Context, obj *model.WorkflowLineage) ([]*model.WorkflowLineage, error)
type Projector ¶
type Projector struct {
// contains filtered or unexported fields
}
Projector listens to events and maintains execution lineage.
func NewProjector ¶
NewProjector creates a new Projector.
func (*Projector) GetLineage ¶
GetLineage returns the lineage for a workflow ID.
func (*Projector) GetRelatedLineages ¶
GetRelatedLineages returns all lineages that share metadata with the given workflow ID.
func (*Projector) ListLineages ¶
func (p *Projector) ListLineages() []registry.LineageData
ListLineages returns all lineages as registry.LineageData.
func (*Projector) QueryLineages ¶
func (p *Projector) QueryLineages(filter func(registry.LineageData) bool) []registry.LineageData
QueryLineages returns lineages that match the given filter.
Click to show internal directories.
Click to hide internal directories.