Documentation ¶
Index ¶
- Constants
- func Emit(ctx context.Context, e Event) error
- func EmitError(ctx context.Context, kind string, err error, payload interface{}) error
- func EmitPayload(ctx context.Context, kind string, payload interface{}) error
- func List() ([]string, error)
- func SetManager(custom Manager)
- type DeleteFn
- type Event
- type Listener
- type Manager
- type Payload
Constants ¶
View Source
const ( // ErrGeneral is emitted for general errors. ErrGeneral = "general:err" // ErrPanic is emitted when a panic is recovered. ErrPanic = "panic:err" )
Variables ¶
This section is empty.
Functions ¶
func SetManager ¶
func SetManager(custom Manager)
SetManager allows you to replace the default event manager with a custom one.
Types ¶
type Event ¶
type Event struct { // Kind is the "type" of event "app:start". Kind string `json:"kind"` // Message is optional. Message string `json:"message"` // Payload is optional. Payload Payload `json:"payload"` // Error is optional. Error error `json:"-"` }
Event represents different events in the lifecycle of a Buffalo app.
func (Event) MarshalJSON ¶
MarshalJSON implements the json marshaler for an event.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.