timesource

package
v0.0.0-...-ae8e89f Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventTimeSource

type EventTimeSource struct {
	// contains filtered or unexported fields
}

EventTimeSource serves the fake controlled time.

func NewEventTimeSource

func NewEventTimeSource() *EventTimeSource

func (*EventTimeSource) Now

func (s *EventTimeSource) Now() time.Time

func (*EventTimeSource) Update

func (s *EventTimeSource) Update(now time.Time) *EventTimeSource

type TimeSource

type TimeSource interface {
	Now() time.Time
}

TimeSource is an interface for any entity that provides the current time.

func NewRealTimeSource

func NewRealTimeSource() TimeSource

func NewTickingTimeSource

func NewTickingTimeSource() TimeSource

func NewWorkflowTimeSource

func NewWorkflowTimeSource(ctx workflow.Context) TimeSource

Jump to

Keyboard shortcuts

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