Documentation ¶
Index ¶
- Variables
- func Migrator(configuration ScheduleConfigs) error
- func RegisterActionsAsWorkflows(model workflow.Model) map[string]*Model
- func ScheduleWorker(workflow string) (interface{}, error)
- type Activity
- type ActivityExecutor
- type Client
- type CustomLogger
- type Model
- func (m Model) Listen() (stop func())
- func (m *Model) Schedule(id string) *Schedule
- func (m *Model) SetInput(i func() interface{}) *Model
- func (m *Model) SetOptions(o Options) *Model
- func (m *Model) SetWorkflowFunc(w Workflow) *Model
- func (m *Model) Submit(inputStr string) error
- func (m *Model) WorkflowID() string
- type Options
- type RetryPolicy
- type Schedule
- type ScheduleConfig
- type ScheduleConfigs
- type Workflow
Constants ¶
This section is empty.
Variables ¶
var DefaultOptions = Options{ StartToCloseTimeout: DefaultStartToCloseTimeout, RetryPolicy: DefaultRetryPolicy, }
var DefaultRetryPolicy = &RetryPolicy{MaximumAttempts: 1}
var DefaultStartToCloseTimeout = time.Minute * 30
Functions ¶
func Migrator ¶
func Migrator(configuration ScheduleConfigs) error
func ScheduleWorker ¶
Types ¶
type Client ¶
func (Client) ScheduledConfigs ¶
func (c Client) ScheduledConfigs() (ScheduleConfigs, error)
type CustomLogger ¶
type CustomLogger struct {
// contains filtered or unexported fields
}
CustomLogger adapts the Simiango logger to Temporal's logging interface.
func NewCustomLogger ¶
func NewCustomLogger() *CustomLogger
NewCustomLogger creates a new instance of CustomLogger.
func (*CustomLogger) Debug ¶
func (c *CustomLogger) Debug(msg string, keyvals ...interface{})
Debug logs a debug message.
func (*CustomLogger) Error ¶
func (c *CustomLogger) Error(msg string, keyvals ...interface{})
Error logs an error message.
func (*CustomLogger) Info ¶
func (c *CustomLogger) Info(msg string, keyvals ...interface{})
Info logs an info message.
func (*CustomLogger) Warn ¶
func (c *CustomLogger) Warn(msg string, keyvals ...interface{})
Warn logs a warning message.
type Model ¶
type Model struct { Name string Input func() interface{} Workflow Workflow Activities []Activity Options Options // contains filtered or unexported fields }
Model represents a Temporal Workflow.
func (Model) Listen ¶
func (m Model) Listen() (stop func())
Listen starts a Worker that listens on the Task Queue.
func (*Model) SetInput ¶
SetInput sets the input object for the Model.
The input object is used to unmarshal the input string when submitting a Workflow.
func (*Model) SetOptions ¶
SetOptions sets the ActivityOptions for the Model.
func (*Model) SetWorkflowFunc ¶
SetWorkflowFunc sets the Workflow function for the Model. When left unset, the Model will run a linear Workflow.
The Workflow function is used to create a custom Workflow. it accepts a single argument, a function that executes an Activity and returns the output.
func (*Model) WorkflowID ¶
type Options ¶
type Options = workflow.ActivityOptions
type RetryPolicy ¶
type RetryPolicy = sdk.RetryPolicy
type ScheduleConfig ¶
ScheduleConfig represents a configuration for a scheduled workflow
func (ScheduleConfig) Event ¶
func (s ScheduleConfig) Event() string
func (ScheduleConfig) Name ¶
func (s ScheduleConfig) Name() string
func (*ScheduleConfig) ParseMemo ¶
func (s *ScheduleConfig) ParseMemo(memo *common.Memo) error
type ScheduleConfigs ¶
type ScheduleConfigs []ScheduleConfig
ScheduleConfigs is a collection of ScheduleConfig
func (*ScheduleConfigs) Add ¶
func (configs *ScheduleConfigs) Add(config ScheduleConfig)
func (ScheduleConfigs) Contains ¶
func (configs ScheduleConfigs) Contains(config ScheduleConfig) bool
func (ScheduleConfigs) Diff ¶
func (configs ScheduleConfigs) Diff(comparable ScheduleConfigs) ScheduleConfigs
type Workflow ¶
type Workflow = func(input ActivityExecutor) (any, error)