remotedb server: ro db (#313)

This commit is contained in:
Alex Sharov 2022-02-11 16:02:57 +07:00 committed by GitHub
parent 441a4c3cde
commit 7aec036bdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,12 +44,12 @@ var KvServiceAPIVersion = &types.VersionReply{Major: 5, Minor: 1, Patch: 0}
type KvServer struct {
remote.UnimplementedKVServer // must be embedded to have forward compatible implementations.
kv kv.RwDB
kv kv.RoDB
stateChangeStreams *StateChangePubSub
ctx context.Context
}
func NewKvServer(ctx context.Context, kv kv.RwDB) *KvServer {
func NewKvServer(ctx context.Context, kv kv.RoDB) *KvServer {
return &KvServer{kv: kv, stateChangeStreams: newStateChangeStreams(), ctx: ctx}
}