Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncJobCompleter ¶
type AsyncJobCompleter struct { baseservice.BaseService // contains filtered or unexported fields }
func NewAsyncCompleter ¶
func NewAsyncCompleter(archetype *baseservice.Archetype, adapter dbadapter.Adapter, concurrency uint32) *AsyncJobCompleter
func (*AsyncJobCompleter) JobSetStateIfRunning ¶ added in v0.0.13
func (c *AsyncJobCompleter) JobSetStateIfRunning(stats *jobstats.JobStatistics, params *dbadapter.JobSetStateIfRunningParams) error
func (*AsyncJobCompleter) Subscribe ¶
func (c *AsyncJobCompleter) Subscribe(subscribeFunc func(update CompleterJobUpdated))
func (*AsyncJobCompleter) Wait ¶
func (c *AsyncJobCompleter) Wait()
type CompleterJobUpdated ¶
type CompleterJobUpdated struct { Job *dbsqlc.RiverJob JobStats *jobstats.JobStatistics }
type InlineJobCompleter ¶
type InlineJobCompleter struct { baseservice.BaseService // contains filtered or unexported fields }
func NewInlineCompleter ¶
func NewInlineCompleter(archetype *baseservice.Archetype, adapter dbadapter.Adapter) *InlineJobCompleter
func (*InlineJobCompleter) JobSetStateIfRunning ¶ added in v0.0.13
func (c *InlineJobCompleter) JobSetStateIfRunning(stats *jobstats.JobStatistics, params *dbadapter.JobSetStateIfRunningParams) error
func (*InlineJobCompleter) Subscribe ¶
func (c *InlineJobCompleter) Subscribe(subscribeFunc func(update CompleterJobUpdated))
func (*InlineJobCompleter) Wait ¶
func (c *InlineJobCompleter) Wait()
type JobCompleter ¶
type JobCompleter interface { // JobSetState sets a new state for the given job, as long as it's // still running (i.e. its state has not changed to something else already). JobSetStateIfRunning(stats *jobstats.JobStatistics, params *dbadapter.JobSetStateIfRunningParams) error // Subscribe injects a callback which will be invoked whenever a job is // updated. Subscribe(subscribeFunc func(update CompleterJobUpdated)) // Wait waits for all ongoing completions to finish, enabling graceful // shutdown. Wait() }
Click to show internal directories.
Click to hide internal directories.