Documentation ¶
Index ¶
- type StubOnePhaseCommitProtocol
- type StubSubscriber
- func (s StubSubscriber[Entity, ID]) Handle(ctx context.Context, event interface{}) error
- func (s StubSubscriber[Entity, ID]) HandleCreateEvent(ctx context.Context, event pubsub.CreateEvent[Entity]) error
- func (s StubSubscriber[Entity, ID]) HandleDeleteAllEvent(ctx context.Context, event pubsub.DeleteAllEvent) error
- func (s StubSubscriber[Entity, ID]) HandleDeleteByIDEvent(ctx context.Context, event pubsub.DeleteByIDEvent[ID]) error
- func (s StubSubscriber[Entity, ID]) HandleError(ctx context.Context, err error) error
- func (s StubSubscriber[Entity, ID]) HandleUpdateEvent(ctx context.Context, event pubsub.UpdateEvent[Entity]) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StubOnePhaseCommitProtocol ¶
type StubOnePhaseCommitProtocol struct { comproto.OnePhaseCommitProtocol BeginTxFunc func(ctx context.Context) (context.Context, error) CommitTxFunc func(ctx context.Context) error RollbackTxFunc func(ctx context.Context) error }
func (*StubOnePhaseCommitProtocol) CommitTx ¶
func (spy *StubOnePhaseCommitProtocol) CommitTx(ctx context.Context) error
func (*StubOnePhaseCommitProtocol) RollbackTx ¶
func (spy *StubOnePhaseCommitProtocol) RollbackTx(ctx context.Context) error
type StubSubscriber ¶
type StubSubscriber[Entity any, ID any] struct { HandleFunc func(ctx context.Context, event interface{}) error ErrorFunc func(ctx context.Context, err error) error }
func (StubSubscriber[Entity, ID]) Handle ¶
func (s StubSubscriber[Entity, ID]) Handle(ctx context.Context, event interface{}) error
func (StubSubscriber[Entity, ID]) HandleCreateEvent ¶
func (s StubSubscriber[Entity, ID]) HandleCreateEvent(ctx context.Context, event pubsub.CreateEvent[Entity]) error
func (StubSubscriber[Entity, ID]) HandleDeleteAllEvent ¶
func (s StubSubscriber[Entity, ID]) HandleDeleteAllEvent(ctx context.Context, event pubsub.DeleteAllEvent) error
func (StubSubscriber[Entity, ID]) HandleDeleteByIDEvent ¶
func (s StubSubscriber[Entity, ID]) HandleDeleteByIDEvent(ctx context.Context, event pubsub.DeleteByIDEvent[ID]) error
func (StubSubscriber[Entity, ID]) HandleError ¶
func (s StubSubscriber[Entity, ID]) HandleError(ctx context.Context, err error) error
func (StubSubscriber[Entity, ID]) HandleUpdateEvent ¶
func (s StubSubscriber[Entity, ID]) HandleUpdateEvent(ctx context.Context, event pubsub.UpdateEvent[Entity]) error
Click to show internal directories.
Click to hide internal directories.