pubsub

package
v0.107.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateEvent

type CreateEvent[Entity any] struct{ Entity Entity }

type CreatorPublisher

type CreatorPublisher[Entity any] interface {
	SubscribeToCreatorEvents(context.Context, CreatorSubscriber[Entity]) (Subscription, error)
}

type CreatorSubscriber

type CreatorSubscriber[Entity any] interface {
	HandleCreateEvent(ctx context.Context, event CreateEvent[Entity]) error
	errorutil.ErrorHandler
}

type DeleteAllEvent

type DeleteAllEvent struct{}

type DeleteByIDEvent

type DeleteByIDEvent[ID any] struct{ ID ID }

type DeleterPublisher

type DeleterPublisher[ID any] interface {
	SubscribeToDeleterEvents(context.Context, DeleterSubscriber[ID]) (Subscription, error)
}

type DeleterSubscriber

type DeleterSubscriber[ID any] interface {
	HandleDeleteByIDEvent(ctx context.Context, event DeleteByIDEvent[ID]) error
	HandleDeleteAllEvent(ctx context.Context, event DeleteAllEvent) error
	errorutil.ErrorHandler
}

type Message added in v0.92.0

type Message[V any] interface {
	ACK() error
	NACK() error
	Data() V
}

type Publisher added in v0.92.0

type Publisher[V any] interface {
	Publish(context.Context, ...V) error
}

type Subscriber added in v0.92.0

type Subscriber[V any] interface {
	Subscribe(context.Context) iterators.Iterator[Message[V]]
}

type Subscription

type Subscription interface {
	io.Closer
}

type UpdateEvent

type UpdateEvent[Entity any] struct{ Entity Entity }

type UpdaterPublisher

type UpdaterPublisher[Entity any] interface {
	SubscribeToUpdaterEvents(context.Context, UpdaterSubscriber[Entity]) (Subscription, error)
}

type UpdaterSubscriber

type UpdaterSubscriber[Entity any] interface {
	HandleUpdateEvent(ctx context.Context, event UpdateEvent[Entity]) error
	errorutil.ErrorHandler
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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