mock

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDuration

func FormatDuration(d time.Duration) string

FormatDuration formats a duration as a human-readable string.

func FormatTime

func FormatTime(t time.Time) string

FormatTime formats a time relative to now.

Types

type HistoryEvent

type HistoryEvent struct {
	ID      int64
	Type    string
	Time    time.Time
	Details string
}

HistoryEvent represents a workflow history event.

func Events

func Events(workflowID string) []HistoryEvent

Events returns mock event history for a workflow.

type Namespace

type Namespace struct {
	Name            string
	State           string
	RetentionPeriod string
}

Namespace represents a Temporal namespace.

func Namespaces

func Namespaces() []Namespace

Namespaces returns mock namespace data.

type Poller

type Poller struct {
	Identity       string
	LastAccessTime time.Time
	TaskQueueType  string
}

Poller represents a task queue poller.

func Pollers

func Pollers(taskQueue string) []Poller

Pollers returns mock poller data for a task queue.

type TaskQueue

type TaskQueue struct {
	Name        string
	Type        string
	PollerCount int
	Backlog     int
}

TaskQueue represents a task queue.

func TaskQueues

func TaskQueues() []TaskQueue

TaskQueues returns mock task queue data.

type Workflow

type Workflow struct {
	ID        string
	RunID     string
	Type      string
	Status    string
	Namespace string
	TaskQueue string
	StartTime time.Time
	EndTime   *time.Time
	ParentID  *string
}

Workflow represents a workflow execution.

func Workflows

func Workflows(namespace string) []Workflow

Workflows returns mock workflow data for a namespace.

Jump to

Keyboard shortcuts

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