Chore: Remove dead code (#28664)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-11-05 11:00:00 +01:00
committed by GitHub
parent abe96f4f89
commit dff84f6a31
21 changed files with 49 additions and 596 deletions

View File

@@ -9,9 +9,6 @@ import (
// HandlerFunc defines a handler function interface.
type HandlerFunc interface{}
// CtxHandlerFunc defines a context handler function.
type CtxHandlerFunc func()
// Msg defines a message interface.
type Msg interface{}
@@ -204,14 +201,6 @@ func Publish(msg Msg) error {
return globalBus.Publish(msg)
}
// InTransaction starts a transaction and store it in the context.
// The caller can then pass a function with multiple DispatchCtx calls that
// all will be executed in the same transaction. InTransaction will rollback if the
// callback returns an error.
func InTransaction(ctx context.Context, fn func(ctx context.Context) error) error {
return globalBus.InTransaction(ctx, fn)
}
func ClearBusHandlers() {
globalBus = New()
}