pubsub

package
v0.392.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 14 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 Scheduler added in v0.244.0

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

type Service added in v0.370.0

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

func New

func New(ctx context.Context, conn libdal.Connection, encryption *encryption.Service, asyncCallListener optional.Option[AsyncCallListener]) *Service

func (*Service) AsyncCallDidCommit added in v0.370.0

func (s *Service) AsyncCallDidCommit(ctx context.Context, origin async.AsyncOriginPubSub)

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

func (*Service) CreateSubscribers added in v0.370.0

func (s *Service) CreateSubscribers(ctx context.Context, key model.DeploymentKey, module *schema.Module) error

func (*Service) CreateSubscriptions added in v0.370.0

func (s *Service) CreateSubscriptions(ctx context.Context, key model.DeploymentKey, module *schema.Module) error

func (*Service) OnCallCompletion added in v0.370.0

func (s *Service) OnCallCompletion(ctx context.Context, tx libdal.Connection, origin async.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.

func (*Service) PublishEventForTopic added in v0.370.0

func (s *Service) PublishEventForTopic(ctx context.Context, module, topic, caller string, payload []byte) error

func (*Service) RemoveSubscriptionsAndSubscribers added in v0.370.0

func (s *Service) RemoveSubscriptionsAndSubscribers(ctx context.Context, key model.DeploymentKey) error

func (*Service) ResetSubscription added in v0.370.0

func (s *Service) ResetSubscription(ctx context.Context, module, name string) (err error)

Directories

Path Synopsis
internal
dal
sql

Jump to

Keyboard shortcuts

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