Registry / messaging / mustafaturan-bus

mustafaturan-bus

JSON →
library1.0.2gogounverified

A minimalist event/message bus for internal communication in Go applications.

go get github.com/mustafaturan/bus
INSTALL
IMPORT
SIG · MUSTAFATURAN-BUS
M
mustafaturan-bus
messaginggov1.0.2
harness data pending
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") }
Debug
Known issues
gotchaRequires a unique ID generator like monoton; not included.
fix
Install github.com/mustafaturan/monoton and configure before use.
affects: all
Upgrade
Version history
1.0.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Amazon
1
OpenAI (training)
1
Resources
mustafaturan-bus — go get mustafaturan-bus · libregistry