package server import ( "encoding/json" "git.lucasrguerra.dev.br/ciberfauna/urutau/internal/store" ) // fakeBackend is an in-process node serving a fixed export. type fakeBackend struct { name string exp store.PeerExport } func (f fakeBackend) Name() string { return f.name } func (f fakeBackend) Export(store.Range) store.PeerExport { return f.exp } func (f fakeBackend) Study(q store.PeriodQuery) store.PeerStudy { return store.PeerStudy{} } func (f fakeBackend) Egress(from, to int64) json.RawMessage { return nil } func (f fakeBackend) Subscribe() (<-chan store.LiveEvent, func()) { return make(chan store.LiveEvent), func() {} } func (f fakeBackend) SubscribeVisits() (<-chan store.VisitMsg, func()) { return make(chan store.VisitMsg), func() {} } func (f fakeBackend) Online() bool { return true } func (f fakeBackend) Location() *store.Location { return nil }