local

package
v0.0.0-...-e43f319 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandBus

type CommandBus struct {
	// contains filtered or unexported fields
}

CommandBus is a command bus that handles commands with the registered CommandHandlers

func NewCommandBus

func NewCommandBus() *CommandBus

NewCommandBus creates a CommandBus.

func (*CommandBus) HandleCommand

func (b *CommandBus) HandleCommand(ctx context.Context, cmd eh.Command) error

HandleCommand handles a command with a handler capable of handling it.

func (*CommandBus) SetHandler

func (b *CommandBus) SetHandler(handler eh.CommandHandler, cmdType eh.CommandType) error

SetHandler adds a handler for a specific command.

Jump to

Keyboard shortcuts

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