A simple Go package for implementing an internal async event bus. This is for learning Goroutine to handle asynchronous event publishing and subscription, making it efficient and easy to integrate with Go apps.
go test -benchtime 10000000x -benchmem -run=^$ -bench=.
goos: darwin
goarch: arm64
pkg: github.com/surasithaof/eventbus
cpu: Apple M1
BenchmarkSubscribe-8 10000000 57.72 ns/op 42 B/op 0 allocs/op
BenchmarkPublish-8 10000000 406.3 ns/op 96 B/op 2 allocs/op
PASS
ok github.com/surasithaof/eventbus 4.909s