pubsub

package
v0.364.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncCallListener added in v0.244.0

type AsyncCallListener interface {
	AsyncCallWasAdded(ctx context.Context)
}

type DAL

type DAL interface {
	ProgressSubscriptions(ctx context.Context, eventConsumptionDelay time.Duration) (count int, err error)
	CompleteEventForSubscription(ctx context.Context, module, name string) error
}

type Manager

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

func New

func New(ctx context.Context, dal *dal.DAL, scheduler Scheduler, asyncCallListener AsyncCallListener) *Manager

func (*Manager) AsyncCallDidCommit added in v0.244.0

func (m *Manager) AsyncCallDidCommit(ctx context.Context, origin dal.AsyncOriginPubSub)

AsyncCallDidCommit is called after an subscription's async call has been completed and committed to the database.

func (*Manager) OnCallCompletion

func (m *Manager) OnCallCompletion(ctx context.Context, tx *dal.DAL, origin dal.AsyncOriginPubSub, failed bool, isFinalResult bool) error

OnCallCompletion is called within a transaction after an async call has completed to allow the subscription state to be updated.

type Scheduler added in v0.244.0

type Scheduler interface {
	Singleton(retry backoff.Backoff, job scheduledtask.Job)
	Parallel(retry backoff.Backoff, job scheduledtask.Job)
}

Jump to

Keyboard shortcuts

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