Files
monibuca/pkg/event-bus.go
2024-03-19 08:41:26 +08:00

17 lines
360 B
Go

package pkg
// EventBus is a simple event bus
type EventBus chan any
// NewEventBus creates a new EventBus
func NewEventBus() EventBus {
return make(chan any)
}
// // Publish publishes an event
// func (e *EventBus) Publish(event any) {
// }
// // Subscribe subscribes to an event
// func (e *EventBus) Subscribe(event any, handler func(event any)) {
// }