it never ends.

This commit is contained in:
fiatjaf
2025-04-16 02:59:47 -03:00
parent cb0dd45a32
commit 5b8954461f
53 changed files with 396 additions and 673 deletions

View File

@@ -0,0 +1,26 @@
package wrappers
import (
"context"
"fiatjaf.com/nostr"
"fiatjaf.com/nostr/eventstore"
)
var _ nostr.Querier = StoreQuerier{}
type StoreQuerier struct {
eventstore.Store
}
func (w StoreQuerier) QueryEvents(ctx context.Context, filter nostr.Filter) (chan nostr.Event, error) {
ch := make(chan nostr.Event)
go func() {
for evt := range w.Store.QueryEvents(filter) {
ch <- evt
}
}()
return ch, nil
}