Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged MutationFeedStore2, Collection into sgbucket.DataStore #30

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions feeds.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ var activeFeedCount int32 // for tests

//////// BUCKET API: (sgbucket.MutationFeedStore interface)

func (bucket *Bucket) GetFeedType() sgbucket.FeedType {
return sgbucket.DcpFeedType
}

func (bucket *Bucket) StartDCPFeed(
ctx context.Context,
args sgbucket.FeedArguments,
Expand Down Expand Up @@ -84,13 +80,6 @@ func (bucket *Bucket) StartDCPFeed(
return nil
}

func (wh *Bucket) StartTapFeed(
args sgbucket.FeedArguments,
dbStats *expvar.Map,
) (sgbucket.MutationFeed, error) {
return nil, &ErrUnimplemented{"rosmar bucket doesn't support tap feed, use DCP"}
}

//////// COLLECTION API:

func (c *Collection) StartDCPFeed(
Expand Down Expand Up @@ -350,8 +339,3 @@ func (e *event) asFeedEvent(collectionID uint32) *sgbucket.FeedEvent {
}
return &feedEvent
}

var (
// Enforce interface conformance:
_ sgbucket.MutationFeedStore2 = &Bucket{}
)
4 changes: 2 additions & 2 deletions feeds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ func TestCollectionMutations(t *testing.T) {
require.NoError(t, err)
numDocs := 50

collectionID_1 := collection1.(sgbucket.Collection).GetCollectionID()
collectionID_2 := collection2.(sgbucket.Collection).GetCollectionID()
collectionID_1 := collection1.GetCollectionID()
collectionID_2 := collection2.GetCollectionID()

// Add n docs to two collections
for i := 1; i <= numDocs; i++ {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/couchbaselabs/rosmar
go 1.19

require (
github.com/couchbase/sg-bucket v0.0.0-20240326230241-0b197e169b27
github.com/couchbase/sg-bucket v0.0.0-20240402154301-12625d8851a8
github.com/google/uuid v1.6.0
github.com/mattn/go-sqlite3 v1.14.22
github.com/stretchr/testify v1.9.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/couchbase/sg-bucket v0.0.0-20240326230241-0b197e169b27 h1:FGNvJsAQk6JZzuVXvoLXcoSQzOnQxWkywzYJFQqzXEg=
github.com/couchbase/sg-bucket v0.0.0-20240326230241-0b197e169b27/go.mod h1:5me3TJLTPfR0s3aMJZcPoTu5FT8oelaINz5l7Q3cApE=
github.com/couchbase/sg-bucket v0.0.0-20240402154301-12625d8851a8 h1:kfWMYvUgSg2yIZJx+t63Ucl+zorvFqlYayXPkiXFtSE=
github.com/couchbase/sg-bucket v0.0.0-20240402154301-12625d8851a8/go.mod h1:5me3TJLTPfR0s3aMJZcPoTu5FT8oelaINz5l7Q3cApE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
Loading