2020-10-23 19:21:37 +00:00
|
|
|
package stream
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
|
|
|
type NoOpEventPublisher struct{}
|
|
|
|
|
|
|
|
func (NoOpEventPublisher) Publish([]Event) {}
|
|
|
|
|
2022-04-12 13:47:42 +00:00
|
|
|
func (NoOpEventPublisher) RegisterHandler(Topic, SnapshotFunc) error {
|
|
|
|
return fmt.Errorf("stream event publisher is disabled")
|
|
|
|
}
|
|
|
|
|
2020-10-23 19:21:37 +00:00
|
|
|
func (NoOpEventPublisher) Run(context.Context) {}
|
|
|
|
|
|
|
|
func (NoOpEventPublisher) Subscribe(*SubscribeRequest) (*Subscription, error) {
|
|
|
|
return nil, fmt.Errorf("stream event publisher is disabled")
|
|
|
|
}
|