Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
bus
✓ github.com/mustafaturan/bus
Configures and emits an event on the bus
package main
import (
"fmt"
"github.com/mustafaturan/bus"
"github.com/mustafaturan/monoton"
"github.com/mustafaturan/monoton/sequencer"
)
func main() {
node := uint64(1)
initialTime := uint64(0)
m, _ := monoton.New(sequencer.NewMillisecond(), node, initialTime)
bus.ConfigureBus(m)
handler := bus.Handler{Handle: func(e *bus.Event) { fmt.Println(e.Topic) }, Matcher: ".*"}
bus.RegisterHandler("handler1", &handler)
bus.Emit("topic1", "data")
}
Upgrade
Version history
1.0.2latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.