feat: wire context store scaffolding and dht test skeleton
This commit is contained in:
24
pkg/slurp/storage/event_notifier_noop.go
Normal file
24
pkg/slurp/storage/event_notifier_noop.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package storage
|
||||
|
||||
import "context"
|
||||
|
||||
// noopEventNotifier implements EventNotifier with no side effects.
|
||||
type noopEventNotifier struct{}
|
||||
|
||||
// NewNoopEventNotifier returns a no-op event notifier implementation.
|
||||
func NewNoopEventNotifier() EventNotifier {
|
||||
return &noopEventNotifier{}
|
||||
}
|
||||
|
||||
func (n *noopEventNotifier) NotifyStored(ctx context.Context, event *StorageEvent) error { return nil }
|
||||
func (n *noopEventNotifier) NotifyRetrieved(ctx context.Context, event *StorageEvent) error {
|
||||
return nil
|
||||
}
|
||||
func (n *noopEventNotifier) NotifyUpdated(ctx context.Context, event *StorageEvent) error { return nil }
|
||||
func (n *noopEventNotifier) NotifyDeleted(ctx context.Context, event *StorageEvent) error { return nil }
|
||||
func (n *noopEventNotifier) Subscribe(ctx context.Context, eventType EventType, handler EventHandler) error {
|
||||
return nil
|
||||
}
|
||||
func (n *noopEventNotifier) Unsubscribe(ctx context.Context, eventType EventType, handler EventHandler) error {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user