command

package
v0.0.0-...-bdb72e3 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT 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 struct {
	// contains filtered or unexported fields
}

func NewBus

func NewBus() Bus

func (Bus) Dispatch

func (b Bus) Dispatch(c Command) error

func (*Bus) RegisterHandler

func (b *Bus) RegisterHandler(c Command, ch Handler) error

type Command

type Command interface {
	CommandID() string
}

type Handler

type Handler interface {
	Handle(Command) error
}

Jump to

Keyboard shortcuts

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