mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
* Replace existing direct StoreManager->msghub communication with this event * For #280 #309 #312 #310 Signed-off-by: James Hillyerd <james@hillyerd.com> Signed-off-by: James Hillyerd <james@hillyerd.com>
24 lines
519 B
Go
24 lines
519 B
Go
package extension
|
|
|
|
import (
|
|
"github.com/inbucket/inbucket/pkg/extension/event"
|
|
)
|
|
|
|
// Host defines extension points for Inbucket.
|
|
type Host struct {
|
|
Events *Events
|
|
}
|
|
|
|
// Events defines all the event types supported by the extension host.
|
|
type Events struct {
|
|
MessageStored EventBroker[event.MessageMetadata, Void]
|
|
}
|
|
|
|
// Void indicates the event emitter will ignore any value returned by listeners.
|
|
type Void struct{}
|
|
|
|
// NewHost creates a new extension host.
|
|
func NewHost() *Host {
|
|
return &Host{Events: &Events{}}
|
|
}
|