Versions in this module Expand all Collapse all v1 v1.0.6 Jan 11, 2025 Changes in this version + var DefaultOptions = Options + var DefaultRetryPolicy = &RetryPolicy + var DefaultStartToCloseTimeout = time.Minute * 30 + func Migrator(configuration ScheduleConfigs) error + func RegisterActionsAsWorkflows(model workflow.Model) map[string]*Model + func ScheduleWorker(workflow string) (interface{}, error) + type Activity struct + Func interface{} + Name string + type ActivityExecutor = func(activity any, input any) (any, error) + type Client struct + func Connect(hosts ...string) Client + func (c Client) HasModel(name string) error + func (c Client) Schedule(name, id string) (*Schedule, error) + func (c Client) ScheduledConfigs() (ScheduleConfigs, error) + func (c Client) Start(name string) (stop func()) + func (c Client) Submit(name, input string) error + type CustomLogger struct + func NewCustomLogger() *CustomLogger + func (c *CustomLogger) Debug(msg string, keyvals ...interface{}) + func (c *CustomLogger) Error(msg string, keyvals ...interface{}) + func (c *CustomLogger) Info(msg string, keyvals ...interface{}) + func (c *CustomLogger) Warn(msg string, keyvals ...interface{}) + type Model struct + Activities []Activity + Input func() interface{} + Name string + Options Options + Workflow Workflow + func Register(name string, activities ...Activity) *Model + func RegisterWorkflowAsWorkflow(model workflow.Model) *Model + 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 + func (m Model) Listen() (stop func()) + type Options = workflow.ActivityOptions + type RetryPolicy = sdk.RetryPolicy + type Schedule struct + func (s *Schedule) ID() string + func (s *Schedule) Remove() error + func (s *Schedule) SetCron(cron string) *Schedule + func (s *Schedule) SetInput(input string) *Schedule + func (s *Schedule) Upsert() error + func (s *Schedule) Validate() error + type ScheduleConfig struct + Comment string + Cron string + ID string + Input string + Workflow string + func (s *ScheduleConfig) ParseMemo(memo *common.Memo) error + func (s ScheduleConfig) Event() string + func (s ScheduleConfig) Name() string + type ScheduleConfigs []ScheduleConfig + func (configs *ScheduleConfigs) Add(config ScheduleConfig) + func (configs ScheduleConfigs) Contains(config ScheduleConfig) bool + func (configs ScheduleConfigs) Diff(comparable ScheduleConfigs) ScheduleConfigs + type Workflow = func(input ActivityExecutor) (any, error)