aboutsummaryrefslogtreecommitdiff
path: root/syncapi/streams/template_pstream.go
diff options
context:
space:
mode:
Diffstat (limited to 'syncapi/streams/template_pstream.go')
-rw-r--r--syncapi/streams/template_pstream.go38
1 files changed, 0 insertions, 38 deletions
diff --git a/syncapi/streams/template_pstream.go b/syncapi/streams/template_pstream.go
deleted file mode 100644
index 265e22a2..00000000
--- a/syncapi/streams/template_pstream.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package streams
-
-import (
- "context"
- "sync"
-
- "github.com/matrix-org/dendrite/syncapi/storage"
- "github.com/matrix-org/dendrite/syncapi/types"
-)
-
-type PartitionedStreamProvider struct {
- DB storage.Database
- latest types.LogPosition
- latestMutex sync.RWMutex
-}
-
-func (p *PartitionedStreamProvider) Setup() {
-}
-
-func (p *PartitionedStreamProvider) Advance(
- latest types.LogPosition,
-) {
- p.latestMutex.Lock()
- defer p.latestMutex.Unlock()
-
- if latest.IsAfter(&p.latest) {
- p.latest = latest
- }
-}
-
-func (p *PartitionedStreamProvider) LatestPosition(
- ctx context.Context,
-) types.LogPosition {
- p.latestMutex.RLock()
- defer p.latestMutex.RUnlock()
-
- return p.latest
-}