pubsub

package
v0.90.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 3 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 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