cqrs

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Command = icqrs.Command
	Query   = icqrs.Query
)

Variables

View Source
var ErrHandlerNotFound = icqrs.ErrHandlerNotFound

Functions

func Register

func Register[TAction icqrs.Action, TResult any](bus Bus, handler Handler[TAction, TResult])

Register registers a type-safe handler for command type C. Panics if a handler is already registered for the same command type.

func Send

func Send[TAction icqrs.Action, TResult any](ctx context.Context, bus Bus, action TAction) (TResult, error)

Send dispatches a command through the behavior pipeline to its registered handler.

Types

type Action

type Action = icqrs.Action

type ActionKind

type ActionKind = icqrs.ActionKind

type BaseCommand

type BaseCommand = icqrs.BaseCommand

type BaseQuery

type BaseQuery = icqrs.BaseQuery

type Behavior

type Behavior = icqrs.Behavior

type BehaviorFunc

type BehaviorFunc = icqrs.BehaviorFunc

type Bus

type Bus = icqrs.Bus

type Handler

type Handler[TAction icqrs.Action, TResult any] = icqrs.Handler[TAction, TResult]

type HandlerFunc

type HandlerFunc[TAction icqrs.Action, TResult any] = icqrs.HandlerFunc[TAction, TResult]

type Unit

type Unit = icqrs.Unit

Jump to

Keyboard shortcuts

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