diag

package
v0.18.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 12 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInstanceTreeBuilder added in v0.7.0

func NewInstanceTreeBuilder(db Backend) *instanceTreeBuilder

func NewServeMux

func NewServeMux(backend Backend) *http.ServeMux

NewServeMux returns an *http.ServeMux that serves the diagnostics web app at / and the diagnostics API at /api which is used by the web app.

Types

type Backend

type Backend interface {
	backend.Backend

	GetWorkflowInstance(ctx context.Context, instance *core.WorkflowInstance) (*WorkflowInstanceRef, error)
	GetWorkflowInstances(ctx context.Context, afterInstanceID, afterExecutionID string, count int) ([]*WorkflowInstanceRef, error)
	GetWorkflowTree(ctx context.Context, instance *core.WorkflowInstance) (*WorkflowInstanceTree, error)
}

type Event

type Event struct {
	ID              string      `json:"id,omitempty"`
	SequenceID      int64       `json:"sequence_id,omitempty"`
	Type            string      `json:"type,omitempty"`
	Timestamp       time.Time   `json:"timestamp,omitempty"`
	ScheduleEventID int64       `json:"schedule_event_id,omitempty"`
	Attributes      interface{} `json:"attributes,omitempty"`
	VisibleAt       *time.Time  `json:"visible_at,omitempty"`
}

type WorkflowInstanceInfo

type WorkflowInstanceInfo struct {
	*WorkflowInstanceRef

	History []*Event `json:"history,omitempty"`
}

type WorkflowInstanceRef

type WorkflowInstanceRef struct {
	Instance    *core.WorkflowInstance     `json:"instance,omitempty"`
	CreatedAt   time.Time                  `json:"created_at,omitempty"`
	CompletedAt *time.Time                 `json:"completed_at,omitempty"`
	State       core.WorkflowInstanceState `json:"state"`
}

type WorkflowInstanceTree added in v0.7.0

type WorkflowInstanceTree struct {
	*WorkflowInstanceRef

	WorkflowName string `json:"workflow_name,omitempty"`

	Children []*WorkflowInstanceTree `json:"children,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL