Documentation ¶
Index ¶
- type ArrayMigrationDriver
- func (a *ArrayMigrationDriver) Close() error
- func (a *ArrayMigrationDriver) First() (uint, error)
- func (a *ArrayMigrationDriver) Next(version uint) (uint, error)
- func (a *ArrayMigrationDriver) Open(_ string) (source.Driver, error)
- func (a *ArrayMigrationDriver) Prev(version uint) (uint, error)
- func (a *ArrayMigrationDriver) ReadDown(version uint) (io.ReadCloser, string, error)
- func (a *ArrayMigrationDriver) ReadUp(version uint) (io.ReadCloser, string, error)
- type PostgresBackend
- func (pg *PostgresBackend) CancelWorkflow(ctx context.Context, instanceName string, workflowName string) error
- func (pg *PostgresBackend) Close() error
- func (pg *PostgresBackend) CreateWorkflowSchedule(ctx context.Context, instanceName string, workflowName string, ...) error
- func (pg *PostgresBackend) DequeueTask(ctx context.Context, taskName string) (*cereal.TaskData, cereal.TaskCompleter, error)
- func (pg *PostgresBackend) DequeueWorkflow(ctx context.Context, workflowNames []string) (*cereal.WorkflowEvent, cereal.WorkflowCompleter, error)
- func (pg *PostgresBackend) EnqueueWorkflow(ctx context.Context, w *cereal.WorkflowInstanceData) error
- func (pg *PostgresBackend) GetDueScheduledWorkflow(ctx context.Context) (*cereal.Schedule, cereal.ScheduledWorkflowCompleter, error)
- func (pg *PostgresBackend) GetNextScheduledWorkflow(ctx context.Context) (*cereal.Schedule, error)
- func (pg *PostgresBackend) GetWorkflowInstanceByName(ctx context.Context, instanceName string, workflowName string) (*cereal.WorkflowInstanceData, error)
- func (pg *PostgresBackend) GetWorkflowScheduleByName(ctx context.Context, instanceName string, workflowName string) (*cereal.Schedule, error)
- func (pg *PostgresBackend) Init() error
- func (pg *PostgresBackend) KillWorkflow(ctx context.Context, instanceName string, workflowName string) error
- func (pg *PostgresBackend) ListWorkflowInstances(ctx context.Context, opts cereal.ListWorkflowOpts) ([]*cereal.WorkflowInstanceData, error)
- func (pg *PostgresBackend) ListWorkflowSchedules(ctx context.Context) ([]*cereal.Schedule, error)
- func (pg *PostgresBackend) UpdateWorkflowScheduleByName(ctx context.Context, instanceName string, workflowName string, ...) error
- type PostgresBackendOpt
- type PostgresScheduledWorkflowCompleter
- type PostgresTaskCompleter
- type PostgresWorkflowCompleter
- func (workc *PostgresWorkflowCompleter) Close() error
- func (workc *PostgresWorkflowCompleter) Continue(payload []byte) error
- func (workc *PostgresWorkflowCompleter) Done(result []byte) error
- func (workc *PostgresWorkflowCompleter) EnqueueTask(task *cereal.TaskData, opts cereal.TaskEnqueueOptions) error
- func (workc *PostgresWorkflowCompleter) Fail(workflowErr error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayMigrationDriver ¶
type ArrayMigrationDriver struct {
// contains filtered or unexported fields
}
ArrayMigrationDriver implement the migratesource.Driver interface so that we can use the migrate library without files on disk.
func (*ArrayMigrationDriver) Close ¶
func (a *ArrayMigrationDriver) Close() error
func (*ArrayMigrationDriver) First ¶
func (a *ArrayMigrationDriver) First() (uint, error)
func (*ArrayMigrationDriver) Open ¶
func (a *ArrayMigrationDriver) Open(_ string) (source.Driver, error)
func (*ArrayMigrationDriver) ReadDown ¶
func (a *ArrayMigrationDriver) ReadDown(version uint) (io.ReadCloser, string, error)
func (*ArrayMigrationDriver) ReadUp ¶
func (a *ArrayMigrationDriver) ReadUp(version uint) (io.ReadCloser, string, error)
type PostgresBackend ¶
type PostgresBackend struct {
// contains filtered or unexported fields
}
func NewPostgresBackend ¶
func NewPostgresBackend(connURI string, opts ...PostgresBackendOpt) *PostgresBackend
func (*PostgresBackend) CancelWorkflow ¶
func (*PostgresBackend) Close ¶
func (pg *PostgresBackend) Close() error
func (*PostgresBackend) CreateWorkflowSchedule ¶
func (*PostgresBackend) DequeueTask ¶
func (pg *PostgresBackend) DequeueTask(ctx context.Context, taskName string) (*cereal.TaskData, cereal.TaskCompleter, error)
func (*PostgresBackend) DequeueWorkflow ¶
func (pg *PostgresBackend) DequeueWorkflow(ctx context.Context, workflowNames []string) (*cereal.WorkflowEvent, cereal.WorkflowCompleter, error)
func (*PostgresBackend) EnqueueWorkflow ¶
func (pg *PostgresBackend) EnqueueWorkflow(ctx context.Context, w *cereal.WorkflowInstanceData) error
func (*PostgresBackend) GetDueScheduledWorkflow ¶
func (pg *PostgresBackend) GetDueScheduledWorkflow(ctx context.Context) (*cereal.Schedule, cereal.ScheduledWorkflowCompleter, error)
func (*PostgresBackend) GetNextScheduledWorkflow ¶
func (*PostgresBackend) GetWorkflowInstanceByName ¶
func (pg *PostgresBackend) GetWorkflowInstanceByName(ctx context.Context, instanceName string, workflowName string) (*cereal.WorkflowInstanceData, error)
func (*PostgresBackend) GetWorkflowScheduleByName ¶
func (*PostgresBackend) Init ¶
func (pg *PostgresBackend) Init() error
func (*PostgresBackend) KillWorkflow ¶
func (*PostgresBackend) ListWorkflowInstances ¶
func (pg *PostgresBackend) ListWorkflowInstances(ctx context.Context, opts cereal.ListWorkflowOpts) ([]*cereal.WorkflowInstanceData, error)
func (*PostgresBackend) ListWorkflowSchedules ¶
func (*PostgresBackend) UpdateWorkflowScheduleByName ¶
func (pg *PostgresBackend) UpdateWorkflowScheduleByName( ctx context.Context, instanceName string, workflowName string, opts cereal.WorkflowScheduleUpdateOptions) error
type PostgresBackendOpt ¶
type PostgresBackendOpt func(*PostgresBackend)
func WithTaskPingInterval ¶
func WithTaskPingInterval(taskPingInterval time.Duration) PostgresBackendOpt
type PostgresScheduledWorkflowCompleter ¶
type PostgresScheduledWorkflowCompleter struct {
// contains filtered or unexported fields
}
func (*PostgresScheduledWorkflowCompleter) Close ¶
func (c *PostgresScheduledWorkflowCompleter) Close()
func (*PostgresScheduledWorkflowCompleter) DisableSchedule ¶
func (c *PostgresScheduledWorkflowCompleter) DisableSchedule(s *cereal.Schedule) error
func (*PostgresScheduledWorkflowCompleter) EnqueueAndUpdateScheduledWorkflow ¶
func (c *PostgresScheduledWorkflowCompleter) EnqueueAndUpdateScheduledWorkflow(s *cereal.Schedule) error
TODO(ssd) 2019-05-14: We should probably allow bulk insertion of workflows and tasks
type PostgresTaskCompleter ¶
type PostgresTaskCompleter struct {
// contains filtered or unexported fields
}
func (*PostgresTaskCompleter) Context ¶
func (taskc *PostgresTaskCompleter) Context() context.Context
func (*PostgresTaskCompleter) Fail ¶
func (taskc *PostgresTaskCompleter) Fail(errMsg string) error
func (*PostgresTaskCompleter) Succeed ¶
func (taskc *PostgresTaskCompleter) Succeed(results []byte) error
TODO(ssd) 2019-05-10: Should this and Fail also take a context from the caller? If so, we'll need to
type PostgresWorkflowCompleter ¶
type PostgresWorkflowCompleter struct {
// contains filtered or unexported fields
}
func (*PostgresWorkflowCompleter) Close ¶
func (workc *PostgresWorkflowCompleter) Close() error
func (*PostgresWorkflowCompleter) Continue ¶
func (workc *PostgresWorkflowCompleter) Continue(payload []byte) error
func (*PostgresWorkflowCompleter) Done ¶
func (workc *PostgresWorkflowCompleter) Done(result []byte) error
func (*PostgresWorkflowCompleter) EnqueueTask ¶
func (workc *PostgresWorkflowCompleter) EnqueueTask(task *cereal.TaskData, opts cereal.TaskEnqueueOptions) error
func (*PostgresWorkflowCompleter) Fail ¶
func (workc *PostgresWorkflowCompleter) Fail(workflowErr error) error
Click to show internal directories.
Click to hide internal directories.