doubles

package
v0.142.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 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 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) BeginTx

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

Jump to

Keyboard shortcuts

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