Added support for event channels and global channel/target values. Both events and handlers now have a channel in addition to the target. A channel of ““ on an event or handler indicates the global channel. * On an event this means all handlers for the target, regardless of channel will be called. * On a handler this means that all events for the target, regardless of the channel will call. A target of ““ on an event or handler indicates the generic target. * On an event this means all handlers on the channel, regardless of the target will be called. * On a handlers this means that all events for the channel, regardless of the target will call.
Added support for event channels and global channel/target values.
Both events and handlers now have a channel in addition to the target. A channel of ““ on an event or handler indicates the global channel. * On an event this means all handlers for the target, regardless of channel will be called. * On a handler this means that all events for the target, regardless of the channel will call. A target of ““ on an event or handler indicates the generic target. * On an event this means all handlers on the channel, regardless of the target will be called. * On a handlers this means that all events for the channel, regardless of the target will call.
An Event driven Component framework for Golang based on Circuits (http://github.com/circuits/circuits).
DISCLAIMER: This is not an official Google product.
Basic Usage
import ( “fmt” “go-circuits” )
type MyComponent struct { go-circuits.Component }
func (mc *MyComponent) HelloWorldEventHandler(_ go-circuits.Event) { fmt.Println(“Hello World!”) }
func NewMyComponent() *MyComponent { mc := MyComponent{} mc.RegisterEventHandler(go-circuits.NewEventHandler( “hello_world”, mc.HelloWorldEventHandler )) return &mc }
func main() { mc := NewMyComponent() mc.Fire(go-circuits.BaseEvent{“hello_world”}) mc.Run() }
An Event driven Component framework for Golang based on Circuits (http://github.com/circuits/circuits).
DISCLAIMER: This is not an official Google product.
Basic Usage
import ( “fmt” “go-circuits” )
type MyComponent struct { go-circuits.Component }
func (mc *MyComponent) HelloWorldEventHandler(_ go-circuits.Event) { fmt.Println(“Hello World!”) }
func NewMyComponent() *MyComponent { mc := MyComponent{} mc.RegisterEventHandler(go-circuits.NewEventHandler( “hello_world”, mc.HelloWorldEventHandler )) return &mc }
func main() { mc := NewMyComponent() mc.Fire(go-circuits.BaseEvent{“hello_world”}) mc.Run() }