feat: wire context store scaffolding and dht test skeleton

This commit is contained in:
anthonyrawlins
2025-09-28 14:21:38 +10:00
parent d074520c30
commit ae021b47b9
7 changed files with 266 additions and 12 deletions

View 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
}