veyron2/store: Clean up the store interface.
- Move Search to Object and rename to Query
- Remove Glob (which has already been moved to Object)
Change-Id: I71b6cd251f4bd6b723ccb74210f4fcfc6710dc27
diff --git a/services/store/server/object.go b/services/store/server/object.go
index 74104b3..b5c5a7f 100644
--- a/services/store/server/object.go
+++ b/services/store/server/object.go
@@ -7,6 +7,7 @@
"veyron2/idl"
"veyron2/ipc"
+ "veyron2/query"
"veyron2/services/mounttable"
"veyron2/services/store"
"veyron2/storage"
@@ -157,6 +158,11 @@
return makeServiceStat(stat), nil
}
+// Query returns a sequence of objects that match the given query.
+func (o *object) Query(_ ipc.Context, tid store.TransactionID, q query.Query, stream store.ObjectServiceQueryStream) error {
+ panic("not implemented")
+}
+
type globStreamAdapter struct {
stream mounttable.GlobableServiceGlobStream
}
diff --git a/services/store/server/server.go b/services/store/server/server.go
index 9c5cec1..7fe5895 100644
--- a/services/store/server/server.go
+++ b/services/store/server/server.go
@@ -13,7 +13,6 @@
"veyron2/idl"
"veyron2/ipc"
- "veyron2/query"
"veyron2/security"
"veyron2/services/store"
"veyron2/services/watch"
@@ -199,30 +198,6 @@
return nil
}
-// Glob returns a glob expansion.
-func (s *Server) Glob(ctx ipc.Context, id store.TransactionID, pattern string, stream store.StoreServiceGlobStream) error {
- s.mutex.Lock()
- defer s.mutex.Unlock()
-
- t, ok := s.findTransactionLocked(id)
- if !ok {
- return errTransactionDoesNotExist
- }
- it, err := s.store.Glob(ctx.RemoteID(), t, pattern)
- if err != nil {
- return err
- }
- for ; it.IsValid(); it.Next() {
- if ctx.IsClosed() {
- break
- }
- if err := stream.Send(it.Name()); err != nil {
- return err
- }
- }
- return nil
-}
-
// Watch returns a stream of changes.
func (s *Server) Watch(ctx ipc.Context, req watch.Request, stream watch.WatcherServiceWatchStream) error {
return s.watcher.Watch(ctx, req, stream)
@@ -233,11 +208,6 @@
return s.store.PutMutations(mu)
}
-// query.
-func (s *Server) Search(_ ipc.Context, tid store.TransactionID, q query.Query, stream store.StoreServiceSearchStream) error {
- panic("not implemented")
-}
-
// ReadConflicts returns the stream of conflicts to store values. A
// conflict occurs when there is a concurrent modification to a value.
func (s *Server) ReadConflicts(_ ipc.Context, stream store.StoreServiceReadConflictsStream) error {