Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandEndpoint ¶ added in v1.2.5
func CommandEndpoint[C any](h CommandHandler[C]) endpoint.Endpoint[C, struct{}]
CommandEndpoint convert CommandHandler to Endpoint
func QueryEndpoint ¶ added in v1.2.5
func QueryEndpoint[Q any, R any](h QueryHandler[Q, R]) endpoint.Endpoint[Q, R]
QueryEndpoint convert QueryHandler to Endpoint
Types ¶
type CommandHandler ¶
CommandHandler is a command handler that to update data. Commands should be task-based, rather than data centric. Commands may be placed on a queue for asynchronous processing, rather than being processed synchronously.
func CommandHandlerFunc ¶
func CommandHandlerFunc[C any](f func(ctx context.Context, cmd C) error) CommandHandler[C]
Click to show internal directories.
Click to hide internal directories.