mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-09-26 23:05:55 +08:00
17 lines
360 B
Go
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)) {
|
|
// }
|