How surasithaof/eventbus works
Project type and purpose
• This is an open-source Go library (“EventBus”) that implements an in-process asynchronous publish/subscribe event bus.
• Purpose: allow Go applications to publish events and have subscribers asynchronously receive them via Goroutines.
File structure
• Top-level files:
• eventbus.go – the core implementation of the EventBus
• eventbus_test.go, benchmark_test.go – unit tests and benchmarks
• go.mod, go.sum – module dependencies
• README.md, LICENSE.md – documentation and licensing
• No frontend/backend separation; this is a single-library codebase.
README
• Confirms it’s a minimal async event-bus for learning Goroutine patterns.
• Shows benchmarks for Subscribe and Publish performance.
Detail
• Call out thread‐safety: annotate where mutex locks are held in the core.