Documentation
¶
Index ¶
- Variables
- func Dispatch[T any](ctx context.Context, msg T) error
- func DispatchWithResult[T any, R any](ctx context.Context, msg T) (R, error)
- func Query[T any, R any](ctx context.Context, msg T) (R, error)
- func Reset()
- type Subscription
- func SubscribeCommand[T any](cmd command.Commander[T], runnerOpts ...runner.Option) Subscription
- func SubscribeCommandFunc[T any](handler command.CommandFunc[T], runnerOpts ...runner.Option) Subscription
- func SubscribeQuery[T any, R any](qry command.Querier[T, R], runnerOpts ...runner.Option) Subscription
- func SubscribeQueryFunc[T any, R any](qry command.QueryFunc[T, R], runnerOpts ...runner.Option) Subscription
Constants ¶
This section is empty.
Variables ¶
View Source
var ExitOnErr = false
Functions ¶
func DispatchWithResult ¶ added in v0.3.0
Types ¶
type Subscription ¶
type Subscription interface {
Unsubscribe()
}
func SubscribeCommand ¶
Subscribe a CommandHandler for a particular message type T. TODO: should this return an error?!
func SubscribeCommandFunc ¶
func SubscribeCommandFunc[T any](handler command.CommandFunc[T], runnerOpts ...runner.Option) Subscription
func SubscribeQuery ¶
func SubscribeQuery[T any, R any](qry command.Querier[T, R], runnerOpts ...runner.Option) Subscription
Subscribe a QueryHandler for a particular message type T, R.
func SubscribeQueryFunc ¶
Click to show internal directories.
Click to hide internal directories.