Discover Packages
github.com/blademindeu/wings
events
package
Version:
v1.11.13
Opens a new window with list of versions in this module.
Published: Nov 7, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func DecodeTo(data []byte , v interface{}) error
DecodeTo decodes a byte slice of event data into the given interface.
Bus represents an Event Bus.
NewBus returns a new empty Bus. This is simply a nicer wrapper around the
system.SinkPool implementation that allows for more simplistic usage within
the codebase.
All of the events emitted out of this bus are byte slices that can be decoded
back into an events.Event interface.
func (b *Bus ) Publish(topic string , data interface{})
Publish publishes a message to the Bus.
type Event struct {
Topic string
Data interface{}
}
Event represents an Event sent over a Bus.
MustDecode decodes the event byte slice back into an events.Event struct or
panics if an error is encountered during this process.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.