pubsub

package
v0.78.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 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[Ent any] struct{ Entity Ent }

type CreatorPublisher

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

type CreatorSubscriber

type CreatorSubscriber[Ent any] interface {
	HandleCreateEvent(ctx context.Context, event CreateEvent[Ent]) error
	errutils.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
	errutils.ErrorHandler
}

type Subscription

type Subscription interface {
	io.Closer
}

type UpdateEvent

type UpdateEvent[Ent any] struct{ Entity Ent }

type UpdaterPublisher

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

type UpdaterSubscriber

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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