diag

package
v0.0.0-...-25251a0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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, instanceID string) (*WorkflowInstanceRef, error)
	GetWorkflowInstances(ctx context.Context, afterInstanceID string, count int) ([]*WorkflowInstanceRef, 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"`
}

Jump to

Keyboard shortcuts

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