command

package
v0.0.0-...-ee0c78d Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

type Bus interface {
	// Dispatch is the method used to dispatch new commands.
	Dispatch(context.Context, Command) error
	// Register is the method used to register a new command handler.
	Register(Type, Handler)
}

Bus defines the expected behaviour from a command bus.

type Command

type Command interface {
	Type() Type
}

Command represents an application command.

type Handler

type Handler interface {
	Handle(context.Context, Command) error
}

Handler defines the expected behaviour from a command handler.

type Type

type Type string

Type represents an application command type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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