go-api-boilerplate: github.com/vardius/go-api-boilerplate/pkg/commandbus Index | Files | Directories

package commandbus

import "github.com/vardius/go-api-boilerplate/pkg/commandbus"

Package commandbus provides interfaces along with helper functions

Index

Package Files

command_bus.go doc.go

type CommandBus Uses

type CommandBus interface {
    Publish(ctx context.Context, command domain.Command, out chan<- error)
    Subscribe(ctx context.Context, commandName string, fn CommandHandler) error
    Unsubscribe(ctx context.Context, commandName string, fn CommandHandler) error
}

CommandBus allows to subscribe/dispatch commands

type CommandHandler Uses

type CommandHandler interface{}

CommandHandler function

Directories

PathSynopsis
memory

Package commandbus imports 2 packages (graph) and is imported by 8 packages. Updated 2020-08-04. Refresh now. Tools for package owners.