couchbase 3.8.0 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ext/cache/extconf_include.rb +4 -4
- data/ext/cache/mozilla-ca-bundle.crt +3 -575
- data/ext/cache/mozilla-ca-bundle.sha256 +1 -1
- data/ext/couchbase/CMakeLists.txt +3 -1
- data/ext/couchbase/core/error_context/base_error_context.hxx +32 -0
- data/ext/couchbase/core/error_context/key_value.cxx +1 -0
- data/ext/couchbase/core/error_context/key_value.hxx +23 -0
- data/ext/couchbase/core/error_context/key_value_error_context.hxx +35 -0
- data/ext/couchbase/core/error_context/subdocument_error_context.hxx +41 -0
- data/ext/couchbase/core/impl/binary_collection.cxx +123 -88
- data/ext/couchbase/core/impl/collection.cxx +416 -189
- data/ext/couchbase/core/impl/error.cxx +29 -4
- data/ext/couchbase/core/impl/invoke_with_node_id.hxx +44 -0
- data/ext/couchbase/core/impl/node_id.cxx +110 -0
- data/ext/couchbase/core/impl/node_id.hxx +40 -0
- data/ext/couchbase/core/io/http_session_manager.hxx +97 -57
- data/ext/couchbase/core/operations/document_get_all_replicas.hxx +14 -4
- data/ext/couchbase/core/operations/document_get_projected.cxx +3 -4
- data/ext/couchbase/core/operations/document_lookup_in_all_replicas.hxx +4 -0
- data/ext/couchbase/core/operations/document_query.cxx +12 -12
- data/ext/couchbase/core/operations/management/collection_create.cxx +11 -11
- data/ext/couchbase/core/operations/management/collection_drop.cxx +11 -11
- data/ext/couchbase/core/operations/management/collection_update.cxx +11 -11
- data/ext/couchbase/core/operations/management/error_utils.cxx +9 -6
- data/ext/couchbase/core/operations/management/query_index_create.cxx +5 -4
- data/ext/couchbase/core/operations/management/query_index_drop.cxx +7 -6
- data/ext/couchbase/core/operations/management/scope_create.cxx +12 -13
- data/ext/couchbase/core/operations/management/scope_drop.cxx +8 -9
- data/ext/couchbase/core/topology/configuration.cxx +21 -0
- data/ext/couchbase/core/topology/configuration.hxx +28 -0
- data/ext/couchbase/core/utils/contains_string.cxx +61 -0
- data/ext/couchbase/core/utils/contains_string.hxx +26 -0
- data/ext/couchbase/couchbase/collection.hxx +73 -0
- data/ext/couchbase/couchbase/error.hxx +16 -0
- data/ext/couchbase/couchbase/node_id.hxx +123 -0
- data/ext/couchbase/couchbase/node_id_for_options.hxx +61 -0
- data/ext/couchbase/couchbase/node_ids_options.hxx +62 -0
- data/ext/couchbase/couchbase/result.hxx +42 -0
- data/ext/rcb_crud.cxx +2 -0
- data/ext/rcb_logger.cxx +15 -17
- data/lib/couchbase/datastructures/couchbase_list.rb +1 -0
- data/lib/couchbase/datastructures/couchbase_map.rb +1 -0
- data/lib/couchbase/datastructures/couchbase_queue.rb +1 -0
- data/lib/couchbase/datastructures/couchbase_set.rb +1 -0
- data/lib/couchbase/errors.rb +1 -1
- data/lib/couchbase/json_transcoder.rb +1 -1
- data/lib/couchbase/options.rb +2 -2
- data/lib/couchbase/protostellar/client.rb +0 -2
- data/lib/couchbase/protostellar/cluster.rb +4 -0
- data/lib/couchbase/protostellar/generated/admin/analytics/v1/analytics_pb.rb +54 -0
- data/lib/couchbase/protostellar/generated/admin/analytics/v1/analytics_services_pb.rb +51 -0
- data/lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_pb.rb +5 -24
- data/lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_services_pb.rb +16 -0
- data/lib/couchbase/protostellar/generated/admin/collection/v1/collection_pb.rb +5 -24
- data/lib/couchbase/protostellar/generated/admin/collection/v1/collection_services_pb.rb +16 -0
- data/lib/couchbase/protostellar/generated/admin/query/v1/query_pb.rb +5 -24
- data/lib/couchbase/protostellar/generated/admin/query/v1/query_services_pb.rb +18 -0
- data/lib/couchbase/protostellar/generated/admin/search/v1/search_pb.rb +2 -23
- data/lib/couchbase/protostellar/generated/admin/search/v1/search_services_pb.rb +23 -0
- data/lib/couchbase/protostellar/generated/analytics/v1/analytics_pb.rb +4 -25
- data/lib/couchbase/protostellar/generated/analytics/v1/analytics_services_pb.rb +10 -0
- data/lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_pb.rb +6 -25
- data/lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_services_pb.rb +18 -0
- data/lib/couchbase/protostellar/generated/internal/xdcr/v1/xdcr_pb.rb +46 -0
- data/lib/couchbase/protostellar/generated/internal/xdcr/v1/xdcr_services_pb.rb +56 -0
- data/lib/couchbase/protostellar/generated/kv/v1/kv_pb.rb +3 -26
- data/lib/couchbase/protostellar/generated/kv/v1/kv_services_pb.rb +47 -0
- data/lib/couchbase/protostellar/generated/query/v1/query_pb.rb +4 -26
- data/lib/couchbase/protostellar/generated/query/v1/query_services_pb.rb +10 -0
- data/lib/couchbase/protostellar/generated/routing/v2/routing_pb.rb +26 -0
- data/lib/couchbase/protostellar/generated/routing/v2/routing_services_pb.rb +43 -0
- data/lib/couchbase/protostellar/generated/search/v1/search_pb.rb +5 -26
- data/lib/couchbase/protostellar/generated/search/v1/search_services_pb.rb +11 -0
- data/lib/couchbase/protostellar/generated/transactions/v1/transactions_pb.rb +2 -23
- data/lib/couchbase/protostellar/generated/transactions/v1/transactions_services_pb.rb +30 -0
- data/lib/couchbase/protostellar/generated/view/v1/view_pb.rb +2 -23
- data/lib/couchbase/protostellar/generated/view/v1/view_services_pb.rb +9 -0
- data/lib/couchbase/protostellar/request_generator/admin/collection.rb +4 -2
- data/lib/couchbase/protostellar/request_generator/admin/query.rb +2 -0
- data/lib/couchbase/protostellar/request_generator/kv.rb +1 -1
- data/lib/couchbase/protostellar/scope.rb +4 -0
- data/lib/couchbase/utils/observability.rb +10 -4
- data/lib/couchbase/version.rb +1 -1
- metadata +19 -7
- data/lib/couchbase/protostellar/generated/routing/v1/routing_pb.rb +0 -52
- data/lib/couchbase/protostellar/generated/routing/v1/routing_services_pb.rb +0 -30
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# Source: couchbase/internal/hooks/v1/hooks.proto for package 'Couchbase.Protostellar.Generated.Internal.Hooks.V1'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Hooks Service (Internal / Debug Only)
|
|
5
|
+
#
|
|
6
|
+
# Provides a testing hooks framework for intercepting, modifying, and
|
|
7
|
+
# controlling gateway behavior during integration testing. Hooks use a
|
|
8
|
+
# small DSL of actions (conditions, counters, barriers, response/error
|
|
9
|
+
# injection) that can be attached to specific gRPC methods.
|
|
10
|
+
#
|
|
11
|
+
# This service is only available when the gateway is started in debug mode.
|
|
3
12
|
|
|
4
13
|
require 'grpc'
|
|
5
14
|
require 'couchbase/protostellar/generated/internal/hooks/v1/hooks_pb'
|
|
@@ -11,6 +20,7 @@ module Couchbase
|
|
|
11
20
|
module Hooks
|
|
12
21
|
module V1
|
|
13
22
|
module HooksService
|
|
23
|
+
# HooksService provides test hook registration and synchronization primitives.
|
|
14
24
|
class Service
|
|
15
25
|
|
|
16
26
|
include ::GRPC::GenericService
|
|
@@ -19,11 +29,19 @@ module Couchbase
|
|
|
19
29
|
self.unmarshal_class_method = :decode
|
|
20
30
|
self.service_name = 'couchbase.internal.hooks.v1.HooksService'
|
|
21
31
|
|
|
32
|
+
# CreateHooksContext creates a new isolated hooks context with its own
|
|
33
|
+
# hooks, counters, and barriers.
|
|
22
34
|
rpc :CreateHooksContext, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::CreateHooksContextRequest, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::CreateHooksContextResponse
|
|
35
|
+
# DestroyHooksContext tears down a hooks context and all its state.
|
|
23
36
|
rpc :DestroyHooksContext, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::DestroyHooksContextRequest, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::DestroyHooksContextResponse
|
|
37
|
+
# AddHooks registers one or more hooks within a context.
|
|
24
38
|
rpc :AddHooks, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::AddHooksRequest, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::AddHooksResponse
|
|
39
|
+
# WatchBarrier streams messages each time a request reaches a barrier.
|
|
25
40
|
rpc :WatchBarrier, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::WatchBarrierRequest, stream(::Couchbase::Protostellar::Generated::Internal::Hooks::V1::WatchBarrierResponse)
|
|
41
|
+
# SignalBarrier signals a barrier to release waiting requests.
|
|
26
42
|
rpc :SignalBarrier, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::SignalBarrierRequest, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::SignalBarrierResponse
|
|
43
|
+
# WatchRequests streams intercepted requests matching registered hooks.
|
|
44
|
+
rpc :WatchRequests, ::Couchbase::Protostellar::Generated::Internal::Hooks::V1::WatchRequestsRequest, stream(::Couchbase::Protostellar::Generated::Internal::Hooks::V1::WatchRequestsResponse)
|
|
27
45
|
end
|
|
28
46
|
|
|
29
47
|
Stub = Service.rpc_stub_class
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: couchbase/internal/xdcr/v1/xdcr.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
descriptor_data = "\n%couchbase/internal/xdcr/v1/xdcr.proto\x12\x1a\x63ouchbase.internal.xdcr.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"#\n\x10HeartbeatRequest\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\"\x13\n\x11HeartbeatResponse\"\x17\n\x15GetClusterInfoRequest\"|\n\x16GetClusterInfoResponse\x12\x14\n\x0c\x63luster_uuid\x18\x01 \x01(\t\x12@\n\x07\x65\x64ition\x18\x02 \x01(\x0e\x32*.couchbase.internal.xdcr.v1.ClusterEditionH\x00\x88\x01\x01\x42\n\n\x08_edition\"+\n\x14GetBucketInfoRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\"\x94\x02\n\x15GetBucketInfoResponse\x12\x13\n\x0b\x62ucket_uuid\x18\x02 \x01(\t\x12\x14\n\x0cnum_vbuckets\x18\x03 \x01(\r\x12T\n\x18\x63onflict_resolution_type\x18\x04 \x01(\x0e\x32\x32.couchbase.internal.xdcr.v1.ConflictResolutionType\x12(\n cross_cluster_versioning_enabled\x18\x05 \x01(\x08\x12@\n\x0b\x62ucket_type\x18\x06 \x01(\x0e\x32&.couchbase.internal.xdcr.v1.BucketTypeH\x00\x88\x01\x01\x42\x0e\n\x0c_bucket_type\"\xa5\x01\n\x15GetVbucketInfoRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x13\n\x0bvbucket_ids\x18\x02 \x03(\r\x12\x1c\n\x0finclude_history\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x0finclude_max_cas\x18\x04 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_include_historyB\x12\n\x10_include_max_cas\"\xd3\x02\n\x16GetVbucketInfoResponse\x12Q\n\x08vbuckets\x18\x02 \x03(\x0b\x32?.couchbase.internal.xdcr.v1.GetVbucketInfoResponse.VbucketState\x1a+\n\x0cHistoryEntry\x12\x0c\n\x04uuid\x18\x01 \x01(\x04\x12\r\n\x05seqno\x18\x02 \x01(\x04\x1a\xb8\x01\n\x0cVbucketState\x12\x12\n\nvbucket_id\x18\x01 \x01(\r\x12\x0c\n\x04uuid\x18\x02 \x01(\x04\x12\x12\n\nhigh_seqno\x18\x03 \x01(\x04\x12P\n\x07history\x18\x04 \x03(\x0b\x32?.couchbase.internal.xdcr.v1.GetVbucketInfoResponse.HistoryEntry\x12\x14\n\x07max_cas\x18\x05 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_max_cas\".\n\x17WatchCollectionsRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\"\xc0\x02\n\x18WatchCollectionsResponse\x12\x14\n\x0cmanifest_uid\x18\x01 \x01(\r\x12J\n\x06scopes\x18\x02 \x03(\x0b\x32:.couchbase.internal.xdcr.v1.WatchCollectionsResponse.Scope\x1a<\n\nCollection\x12\x15\n\rcollection_id\x18\x01 \x01(\r\x12\x17\n\x0f\x63ollection_name\x18\x02 \x01(\t\x1a\x83\x01\n\x05Scope\x12\x10\n\x08scope_id\x18\x01 \x01(\r\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12T\n\x0b\x63ollections\x18\x03 \x03(\x0b\x32?.couchbase.internal.xdcr.v1.WatchCollectionsResponse.Collection\"\xac\x01\n\x12GetDocumentRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x05 \x01(\t\x12\x17\n\x0finclude_content\x18\x06 \x01(\x08\x12\x1b\n\x0einclude_xattrs\x18\x07 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_include_xattrs\"\xce\x02\n\x13GetDocumentResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12*\n\x06\x65xpiry\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nis_deleted\x18\x03 \x01(\x08\x12\x10\n\x08\x64\x61tatype\x18\x05 \x01(\r\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x1f\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x88\x01\x01\x12\r\n\x05revno\x18\x08 \x01(\x04\x12K\n\x06xattrs\x18\t \x03(\x0b\x32;.couchbase.internal.xdcr.v1.GetDocumentResponse.XattrsEntry\x1a-\n\x0bXattrsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x42\x15\n\x13_content_compressed\"\xae\x02\n\x14\x43heckDocumentRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x11\n\tstore_cas\x18\x05 \x01(\x04\x12\r\n\x05revno\x18\x06 \x01(\x04\x12\x15\n\rcontent_flags\x18\x07 \x01(\r\x12\x12\n\nhas_xattrs\x18\x08 \x01(\x08\x12\x34\n\x0b\x65xpiry_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x12\n\nis_deleted\x18\n \x01(\x08\x12\x14\n\x07vb_uuid\x18\x0b \x01(\x04H\x01\x88\x01\x01\x42\x0e\n\x0c_expiry_timeB\n\n\x08_vb_uuid\"\'\n\x15\x43heckDocumentResponse\x12\x0e\n\x06\x65xists\x18\x01 \x01(\x08\"\xc3\x04\n\x13PushDocumentRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x16\n\tcheck_cas\x18\x05 \x01(\x04H\x01\x88\x01\x01\x12\x11\n\tstore_cas\x18\x06 \x01(\x04\x12\r\n\x05revno\x18\x07 \x01(\x04\x12\x15\n\rcontent_flags\x18\x08 \x01(\r\x12=\n\x0c\x63ontent_type\x18\t \x01(\x0e\x32\'.couchbase.internal.xdcr.v1.ContentType\x12\x1e\n\x14\x63ontent_uncompressed\x18\x0f \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\n \x01(\x0cH\x00\x12K\n\x06xattrs\x18\x10 \x03(\x0b\x32;.couchbase.internal.xdcr.v1.PushDocumentRequest.XattrsEntry\x12\x34\n\x0b\x65xpiry_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02\x88\x01\x01\x12\x12\n\nis_deleted\x18\x0c \x01(\x08\x12\x14\n\x07vb_uuid\x18\r \x01(\x04H\x03\x88\x01\x01\x1a-\n\x0bXattrsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x42\t\n\x07\x63ontentB\x0c\n\n_check_casB\x0e\n\x0c_expiry_timeB\n\n\x08_vb_uuid\"2\n\x14PushDocumentResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\r\n\x05seqno\x18\x02 \x01(\x04*O\n\x0e\x43lusterEdition\x12\x1d\n\x19\x43LUSTER_EDITION_COMMUNITY\x10\x00\x12\x1e\n\x1a\x43LUSTER_EDITION_ENTERPRISE\x10\x01*\x93\x01\n\x16\x43onflictResolutionType\x12&\n\"CONFLICT_RESOLUTION_TYPE_TIMESTAMP\x10\x00\x12,\n(CONFLICT_RESOLUTION_TYPE_SEQUENCE_NUMBER\x10\x01\x12#\n\x1f\x43ONFLICT_RESOLUTION_TYPE_CUSTOM\x10\x02*B\n\nBucketType\x12\x19\n\x15\x42UCKET_TYPE_COUCHBASE\x10\x00\x12\x19\n\x15\x42UCKET_TYPE_EPHEMERAL\x10\x01*>\n\x0b\x43ontentType\x12\x18\n\x14\x43ONTENT_TYPE_NONJSON\x10\x00\x12\x15\n\x11\x43ONTENT_TYPE_JSON\x10\x01\x32\xcc\x07\n\x0bXdcrService\x12j\n\tHeartbeat\x12,.couchbase.internal.xdcr.v1.HeartbeatRequest\x1a-.couchbase.internal.xdcr.v1.HeartbeatResponse\"\x00\x12y\n\x0eGetClusterInfo\x12\x31.couchbase.internal.xdcr.v1.GetClusterInfoRequest\x1a\x32.couchbase.internal.xdcr.v1.GetClusterInfoResponse\"\x00\x12v\n\rGetBucketInfo\x12\x30.couchbase.internal.xdcr.v1.GetBucketInfoRequest\x1a\x31.couchbase.internal.xdcr.v1.GetBucketInfoResponse\"\x00\x12{\n\x0eGetVbucketInfo\x12\x31.couchbase.internal.xdcr.v1.GetVbucketInfoRequest\x1a\x32.couchbase.internal.xdcr.v1.GetVbucketInfoResponse\"\x00\x30\x01\x12\x81\x01\n\x10WatchCollections\x12\x33.couchbase.internal.xdcr.v1.WatchCollectionsRequest\x1a\x34.couchbase.internal.xdcr.v1.WatchCollectionsResponse\"\x00\x30\x01\x12p\n\x0bGetDocument\x12..couchbase.internal.xdcr.v1.GetDocumentRequest\x1a/.couchbase.internal.xdcr.v1.GetDocumentResponse\"\x00\x12v\n\rCheckDocument\x12\x30.couchbase.internal.xdcr.v1.CheckDocumentRequest\x1a\x31.couchbase.internal.xdcr.v1.CheckDocumentResponse\"\x00\x12s\n\x0cPushDocument\x12/.couchbase.internal.xdcr.v1.PushDocumentRequest\x1a\x30.couchbase.internal.xdcr.v1.PushDocumentResponse\"\x00\x42PZNgithub.com/couchbase/goprotostellar/genproto/internal_xdcr_v1;internal_xdcr_v1b\x06proto3"
|
|
11
|
+
|
|
12
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
|
14
|
+
|
|
15
|
+
module Couchbase
|
|
16
|
+
module Internal
|
|
17
|
+
module Xdcr
|
|
18
|
+
module V1
|
|
19
|
+
HeartbeatRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.HeartbeatRequest").msgclass
|
|
20
|
+
HeartbeatResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.HeartbeatResponse").msgclass
|
|
21
|
+
GetClusterInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetClusterInfoRequest").msgclass
|
|
22
|
+
GetClusterInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetClusterInfoResponse").msgclass
|
|
23
|
+
GetBucketInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetBucketInfoRequest").msgclass
|
|
24
|
+
GetBucketInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetBucketInfoResponse").msgclass
|
|
25
|
+
GetVbucketInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetVbucketInfoRequest").msgclass
|
|
26
|
+
GetVbucketInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetVbucketInfoResponse").msgclass
|
|
27
|
+
GetVbucketInfoResponse::HistoryEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetVbucketInfoResponse.HistoryEntry").msgclass
|
|
28
|
+
GetVbucketInfoResponse::VbucketState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetVbucketInfoResponse.VbucketState").msgclass
|
|
29
|
+
WatchCollectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.WatchCollectionsRequest").msgclass
|
|
30
|
+
WatchCollectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.WatchCollectionsResponse").msgclass
|
|
31
|
+
WatchCollectionsResponse::Collection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.WatchCollectionsResponse.Collection").msgclass
|
|
32
|
+
WatchCollectionsResponse::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.WatchCollectionsResponse.Scope").msgclass
|
|
33
|
+
GetDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetDocumentRequest").msgclass
|
|
34
|
+
GetDocumentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.GetDocumentResponse").msgclass
|
|
35
|
+
CheckDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.CheckDocumentRequest").msgclass
|
|
36
|
+
CheckDocumentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.CheckDocumentResponse").msgclass
|
|
37
|
+
PushDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.PushDocumentRequest").msgclass
|
|
38
|
+
PushDocumentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.PushDocumentResponse").msgclass
|
|
39
|
+
ClusterEdition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.ClusterEdition").enummodule
|
|
40
|
+
ConflictResolutionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.ConflictResolutionType").enummodule
|
|
41
|
+
BucketType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.BucketType").enummodule
|
|
42
|
+
ContentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.internal.xdcr.v1.ContentType").enummodule
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# Source: couchbase/internal/xdcr/v1/xdcr.proto for package 'couchbase.internal.xdcr.v1'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# XDCR Service (Internal / Unstable)
|
|
5
|
+
#
|
|
6
|
+
# Provides cross-datacenter replication (XDCR) primitives for
|
|
7
|
+
# replicating documents between Couchbase clusters. Includes
|
|
8
|
+
# cluster/bucket/vbucket info discovery, collection watching,
|
|
9
|
+
# and document get/check/push operations.
|
|
10
|
+
#
|
|
11
|
+
# @uncommitted This service is not yet stable and may change without warning.
|
|
12
|
+
|
|
13
|
+
require 'grpc'
|
|
14
|
+
require 'couchbase/protostellar/generated/internal/xdcr/v1/xdcr_pb'
|
|
15
|
+
|
|
16
|
+
module Couchbase
|
|
17
|
+
module Internal
|
|
18
|
+
module Xdcr
|
|
19
|
+
module V1
|
|
20
|
+
module XdcrService
|
|
21
|
+
# XdcrService provides XDCR replication operations.
|
|
22
|
+
# @uncommitted This service is not yet stable and may change without warning.
|
|
23
|
+
class Service
|
|
24
|
+
|
|
25
|
+
include ::GRPC::GenericService
|
|
26
|
+
|
|
27
|
+
self.marshal_class_method = :encode
|
|
28
|
+
self.unmarshal_class_method = :decode
|
|
29
|
+
self.service_name = 'couchbase.internal.xdcr.v1.XdcrService'
|
|
30
|
+
|
|
31
|
+
# Heartbeat sends a payload to verify the XDCR connection is alive.
|
|
32
|
+
rpc :Heartbeat, ::Couchbase::Internal::Xdcr::V1::HeartbeatRequest, ::Couchbase::Internal::Xdcr::V1::HeartbeatResponse
|
|
33
|
+
# GetClusterInfo returns the cluster UUID for identity verification.
|
|
34
|
+
rpc :GetClusterInfo, ::Couchbase::Internal::Xdcr::V1::GetClusterInfoRequest, ::Couchbase::Internal::Xdcr::V1::GetClusterInfoResponse
|
|
35
|
+
# GetBucketInfo returns bucket metadata needed for XDCR setup.
|
|
36
|
+
rpc :GetBucketInfo, ::Couchbase::Internal::Xdcr::V1::GetBucketInfoRequest, ::Couchbase::Internal::Xdcr::V1::GetBucketInfoResponse
|
|
37
|
+
# GetVbucketInfo streams vbucket state (UUIDs, seqnos, history)
|
|
38
|
+
# for the requested vbucket IDs.
|
|
39
|
+
rpc :GetVbucketInfo, ::Couchbase::Internal::Xdcr::V1::GetVbucketInfoRequest, stream(::Couchbase::Internal::Xdcr::V1::GetVbucketInfoResponse)
|
|
40
|
+
# WatchCollections streams collection manifest updates for a bucket.
|
|
41
|
+
rpc :WatchCollections, ::Couchbase::Internal::Xdcr::V1::WatchCollectionsRequest, stream(::Couchbase::Internal::Xdcr::V1::WatchCollectionsResponse)
|
|
42
|
+
# GetDocument retrieves a document with full metadata for replication.
|
|
43
|
+
rpc :GetDocument, ::Couchbase::Internal::Xdcr::V1::GetDocumentRequest, ::Couchbase::Internal::Xdcr::V1::GetDocumentResponse
|
|
44
|
+
# CheckDocument checks if a document exists with the given metadata,
|
|
45
|
+
# used for conflict resolution before pushing.
|
|
46
|
+
rpc :CheckDocument, ::Couchbase::Internal::Xdcr::V1::CheckDocumentRequest, ::Couchbase::Internal::Xdcr::V1::CheckDocumentResponse
|
|
47
|
+
# PushDocument pushes a replicated document to the target cluster.
|
|
48
|
+
rpc :PushDocument, ::Couchbase::Internal::Xdcr::V1::PushDocumentRequest, ::Couchbase::Internal::Xdcr::V1::PushDocumentResponse
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
Stub = Service.rpc_stub_class
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -8,33 +8,10 @@ require 'google/rpc/status_pb'
|
|
|
8
8
|
require 'google/protobuf/timestamp_pb'
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
descriptor_data = "\n\x18\x63ouchbase/kv/v1/kv.proto\x12\x0f\x63ouchbase.kv.v1\x1a\x17google/rpc/status.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"E\n\x14LegacyDurabilitySpec\x12\x16\n\x0enum_replicated\x18\x01 \x01(\r\x12\x15\n\rnum_persisted\x18\x02 \x01(\r\"^\n\rMutationToken\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nvbucket_id\x18\x02 \x01(\r\x12\x14\n\x0cvbucket_uuid\x18\x03 \x01(\x04\x12\x0e\n\x06seq_no\x18\x04 \x01(\x04\"\xbb\x01\n\nGetRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0f\n\x07project\x18\x05 \x03(\t\x12=\n\x0b\x63ompression\x18\x06 \x01(\x0e\x32#.couchbase.kv.v1.CompressionEnabledH\x00\x88\x01\x01\x42\x0e\n\x0c_compression\"\xb2\x01\n\x0bGetResponse\x12\x1e\n\x14\x63ontent_uncompressed\x18\x01 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x03 \x01(\x04\x12*\n\x06\x65xpiry\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x63ontentJ\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"\x86\x02\n\x12GetAndTouchRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x31\n\x0b\x65xpiry_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\x06 \x01(\rH\x00\x12=\n\x0b\x63ompression\x18\x07 \x01(\x0e\x32#.couchbase.kv.v1.CompressionEnabledH\x01\x88\x01\x01\x42\x08\n\x06\x65xpiryB\x0e\n\x0c_compression\"\xba\x01\n\x13GetAndTouchResponse\x12\x1e\n\x14\x63ontent_uncompressed\x18\x01 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x03 \x01(\x04\x12*\n\x06\x65xpiry\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x63ontentJ\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"\xc4\x01\n\x11GetAndLockRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x11\n\tlock_time\x18\x05 \x01(\r\x12=\n\x0b\x63ompression\x18\x06 \x01(\x0e\x32#.couchbase.kv.v1.CompressionEnabledH\x00\x88\x01\x01\x42\x0e\n\x0c_compression\"\xb9\x01\n\x12GetAndLockResponse\x12\x1e\n\x14\x63ontent_uncompressed\x18\x01 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x03 \x01(\x04\x12*\n\x06\x65xpiry\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x63ontentJ\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"k\n\rUnlockRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0b\n\x03\x63\x61s\x18\x05 \x01(\x04\"\x10\n\x0eUnlockResponse\"\xb1\x01\n\x0cTouchRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x31\n\x0b\x65xpiry_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\x06 \x01(\rH\x00\x42\x08\n\x06\x65xpiry\"T\n\rTouchResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"^\n\rExistsRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\"-\n\x0e\x45xistsResponse\x12\x0e\n\x06result\x18\x01 \x01(\x08\x12\x0b\n\x03\x63\x61s\x18\x02 \x01(\x04\"\xee\x02\n\rInsertRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x1e\n\x14\x63ontent_uncompressed\x18\x05 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x0c \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x0b \x01(\r\x12\x31\n\x0b\x65xpiry_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x42\t\n\x07\x63ontentB\x08\n\x06\x65xpiryB\x13\n\x11_durability_levelJ\x04\x08\x06\x10\x07\"U\n\x0eInsertResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xb8\x03\n\rUpsertRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x1e\n\x14\x63ontent_uncompressed\x18\x05 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\r \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x0b \x01(\r\x12\x31\n\x0b\x65xpiry_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x01\x12(\n\x1bpreserve_expiry_on_existing\x18\x0c \x01(\x08H\x02\x88\x01\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x03\x88\x01\x01\x42\t\n\x07\x63ontentB\x08\n\x06\x65xpiryB\x1e\n\x1c_preserve_expiry_on_existingB\x13\n\x11_durability_levelJ\x04\x08\x06\x10\x07\"U\n\x0eUpsertResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\x89\x03\n\x0eReplaceRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x1e\n\x14\x63ontent_uncompressed\x18\x05 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\r \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x0c \x01(\r\x12\x10\n\x03\x63\x61s\x18\x07 \x01(\x04H\x02\x88\x01\x01\x12\x31\n\x0b\x65xpiry_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x15\n\x0b\x65xpiry_secs\x18\x0b \x01(\rH\x01\x12?\n\x10\x64urability_level\x18\n \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x03\x88\x01\x01\x42\t\n\x07\x63ontentB\x08\n\x06\x65xpiryB\x06\n\x04_casB\x13\n\x11_durability_levelJ\x04\x08\x06\x10\x07\"V\n\x0fReplaceResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xce\x01\n\rRemoveRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x10\n\x03\x63\x61s\x18\x05 \x01(\x04H\x00\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x07 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x01\x88\x01\x01\x42\x06\n\x04_casB\x13\n\x11_durability_level\"U\n\x0eRemoveResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xbc\x02\n\x10IncrementRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x05 \x01(\x04\x12\x31\n\x0b\x65xpiry_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x00\x12\x14\n\x07initial\x18\x07 \x01(\x03H\x01\x88\x01\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x42\x08\n\x06\x65xpiryB\n\n\x08_initialB\x13\n\x11_durability_level\"i\n\x11IncrementResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x03\x12\x36\n\x0emutation_token\x18\x03 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xbc\x02\n\x10\x44\x65\x63rementRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x05 \x01(\x04\x12\x31\n\x0b\x65xpiry_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x00\x12\x14\n\x07initial\x18\x07 \x01(\x03H\x01\x88\x01\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x42\x08\n\x06\x65xpiryB\n\n\x08_initialB\x13\n\x11_durability_level\"i\n\x11\x44\x65\x63rementResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x03\x12\x36\n\x0emutation_token\x18\x03 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xdf\x01\n\rAppendRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x05 \x01(\x0c\x12\x10\n\x03\x63\x61s\x18\x06 \x01(\x04H\x00\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x01\x88\x01\x01\x42\x06\n\x04_casB\x13\n\x11_durability_level\"U\n\x0e\x41ppendResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xe0\x01\n\x0ePrependRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x05 \x01(\x0c\x12\x10\n\x03\x63\x61s\x18\x06 \x01(\x04H\x00\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x01\x88\x01\x01\x42\x06\n\x04_casB\x13\n\x11_durability_level\"V\n\x0fPrependResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xad\x04\n\x0fLookupInRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x34\n\x05specs\x18\x05 \x03(\x0b\x32%.couchbase.kv.v1.LookupInRequest.Spec\x12:\n\x05\x66lags\x18\x06 \x01(\x0b\x32&.couchbase.kv.v1.LookupInRequest.FlagsH\x00\x88\x01\x01\x1a\x95\x02\n\x04Spec\x12\x42\n\toperation\x18\x01 \x01(\x0e\x32/.couchbase.kv.v1.LookupInRequest.Spec.Operation\x12\x0c\n\x04path\x18\x02 \x01(\t\x12?\n\x05\x66lags\x18\x03 \x01(\x0b\x32+.couchbase.kv.v1.LookupInRequest.Spec.FlagsH\x00\x88\x01\x01\x1a%\n\x05\x46lags\x12\x12\n\x05xattr\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x08\n\x06_xattr\"I\n\tOperation\x12\x11\n\rOPERATION_GET\x10\x00\x12\x14\n\x10OPERATION_EXISTS\x10\x01\x12\x13\n\x0fOPERATION_COUNT\x10\x02\x42\x08\n\x06_flags\x1a\x37\n\x05\x46lags\x12\x1b\n\x0e\x61\x63\x63\x65ss_deleted\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_access_deletedB\x08\n\x06_flags\"\x93\x01\n\x10LookupInResponse\x12\x35\n\x05specs\x18\x01 \x03(\x0b\x32&.couchbase.kv.v1.LookupInResponse.Spec\x12\x0b\n\x03\x63\x61s\x18\x02 \x01(\x04\x1a;\n\x04Spec\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"\x97\t\n\x0fMutateInRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x34\n\x05specs\x18\x05 \x03(\x0b\x32%.couchbase.kv.v1.MutateInRequest.Spec\x12K\n\x0estore_semantic\x18\x06 \x01(\x0e\x32..couchbase.kv.v1.MutateInRequest.StoreSemanticH\x01\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x12\x10\n\x03\x63\x61s\x18\t \x01(\x04H\x03\x88\x01\x01\x12:\n\x05\x66lags\x18\n \x01(\x0b\x32&.couchbase.kv.v1.MutateInRequest.FlagsH\x04\x88\x01\x01\x12\x31\n\x0b\x65xpiry_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\x0c \x01(\rH\x00\x1a\xf8\x03\n\x04Spec\x12\x42\n\toperation\x18\x01 \x01(\x0e\x32/.couchbase.kv.v1.MutateInRequest.Spec.Operation\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12?\n\x05\x66lags\x18\x04 \x01(\x0b\x32+.couchbase.kv.v1.MutateInRequest.Spec.FlagsH\x00\x88\x01\x01\x1aO\n\x05\x46lags\x12\x18\n\x0b\x63reate_path\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x12\n\x05xattr\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x0e\n\x0c_create_pathB\x08\n\x06_xattr\"\xf0\x01\n\tOperation\x12\x14\n\x10OPERATION_INSERT\x10\x00\x12\x14\n\x10OPERATION_UPSERT\x10\x01\x12\x15\n\x11OPERATION_REPLACE\x10\x02\x12\x14\n\x10OPERATION_REMOVE\x10\x03\x12\x1a\n\x16OPERATION_ARRAY_APPEND\x10\x04\x12\x1b\n\x17OPERATION_ARRAY_PREPEND\x10\x05\x12\x1a\n\x16OPERATION_ARRAY_INSERT\x10\x06\x12\x1e\n\x1aOPERATION_ARRAY_ADD_UNIQUE\x10\x07\x12\x15\n\x11OPERATION_COUNTER\x10\x08\x42\x08\n\x06_flags\x1a\x37\n\x05\x46lags\x12\x1b\n\x0e\x61\x63\x63\x65ss_deleted\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_access_deleted\"a\n\rStoreSemantic\x12\x1a\n\x16STORE_SEMANTIC_REPLACE\x10\x00\x12\x19\n\x15STORE_SEMANTIC_UPSERT\x10\x01\x12\x19\n\x15STORE_SEMANTIC_INSERT\x10\x02\x42\x08\n\x06\x65xpiryB\x11\n\x0f_store_semanticB\x13\n\x11_durability_levelB\x06\n\x04_casB\x08\n\x06_flags\"\xb8\x01\n\x10MutateInResponse\x12\x35\n\x05specs\x18\x01 \x03(\x0b\x32&.couchbase.kv.v1.MutateInResponse.Spec\x12\x0b\n\x03\x63\x61s\x18\x02 \x01(\x04\x12\x36\n\x0emutation_token\x18\x03 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\x1a(\n\x04Spec\x12\x14\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\n\n\x08_content\"f\n\x15GetAllReplicasRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\"a\n\x16GetAllReplicasResponse\x12\x12\n\nis_replica\x18\x01 \x01(\x08\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\x12\x15\n\rcontent_flags\x18\x03 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x04 \x01(\x04*\x8f\x01\n\x0f\x44urabilityLevel\x12\x1d\n\x19\x44URABILITY_LEVEL_MAJORITY\x10\x00\x12\x33\n/DURABILITY_LEVEL_MAJORITY_AND_PERSIST_TO_ACTIVE\x10\x01\x12(\n$DURABILITY_LEVEL_PERSIST_TO_MAJORITY\x10\x02*V\n\x12\x43ompressionEnabled\x12 \n\x1c\x43OMPRESSION_ENABLED_OPTIONAL\x10\x00\x12\x1e\n\x1a\x43OMPRESSION_ENABLED_ALWAYS\x10\x01\x32\xf5\n\n\tKvService\x12\x42\n\x03Get\x12\x1b.couchbase.kv.v1.GetRequest\x1a\x1c.couchbase.kv.v1.GetResponse\"\x00\x12Z\n\x0bGetAndTouch\x12#.couchbase.kv.v1.GetAndTouchRequest\x1a$.couchbase.kv.v1.GetAndTouchResponse\"\x00\x12W\n\nGetAndLock\x12\".couchbase.kv.v1.GetAndLockRequest\x1a#.couchbase.kv.v1.GetAndLockResponse\"\x00\x12K\n\x06Unlock\x12\x1e.couchbase.kv.v1.UnlockRequest\x1a\x1f.couchbase.kv.v1.UnlockResponse\"\x00\x12H\n\x05Touch\x12\x1d.couchbase.kv.v1.TouchRequest\x1a\x1e.couchbase.kv.v1.TouchResponse\"\x00\x12K\n\x06\x45xists\x12\x1e.couchbase.kv.v1.ExistsRequest\x1a\x1f.couchbase.kv.v1.ExistsResponse\"\x00\x12K\n\x06Insert\x12\x1e.couchbase.kv.v1.InsertRequest\x1a\x1f.couchbase.kv.v1.InsertResponse\"\x00\x12K\n\x06Upsert\x12\x1e.couchbase.kv.v1.UpsertRequest\x1a\x1f.couchbase.kv.v1.UpsertResponse\"\x00\x12N\n\x07Replace\x12\x1f.couchbase.kv.v1.ReplaceRequest\x1a .couchbase.kv.v1.ReplaceResponse\"\x00\x12K\n\x06Remove\x12\x1e.couchbase.kv.v1.RemoveRequest\x1a\x1f.couchbase.kv.v1.RemoveResponse\"\x00\x12T\n\tIncrement\x12!.couchbase.kv.v1.IncrementRequest\x1a\".couchbase.kv.v1.IncrementResponse\"\x00\x12T\n\tDecrement\x12!.couchbase.kv.v1.DecrementRequest\x1a\".couchbase.kv.v1.DecrementResponse\"\x00\x12K\n\x06\x41ppend\x12\x1e.couchbase.kv.v1.AppendRequest\x1a\x1f.couchbase.kv.v1.AppendResponse\"\x00\x12N\n\x07Prepend\x12\x1f.couchbase.kv.v1.PrependRequest\x1a .couchbase.kv.v1.PrependResponse\"\x00\x12Q\n\x08LookupIn\x12 .couchbase.kv.v1.LookupInRequest\x1a!.couchbase.kv.v1.LookupInResponse\"\x00\x12Q\n\x08MutateIn\x12 .couchbase.kv.v1.MutateInRequest\x1a!.couchbase.kv.v1.MutateInResponse\"\x00\x12\x65\n\x0eGetAllReplicas\x12&.couchbase.kv.v1.GetAllReplicasRequest\x1a\'.couchbase.kv.v1.GetAllReplicasResponse\"\x00\x30\x01\x42\xda\x01\n\'com.couchbase.client.protostellar.kv.v1P\x01Z8github.com/couchbase/goprotostellar/genproto/kv_v1;kv_v1\xaa\x02\x1c\x43ouchbase.Protostellar.KV.V1\xca\x02&Couchbase\\Protostellar\\Generated\\KV\\V1\xea\x02*Couchbase::Protostellar::Generated::KV::V1b\x06proto3"
|
|
11
|
+
descriptor_data = "\n\x18\x63ouchbase/kv/v1/kv.proto\x12\x0f\x63ouchbase.kv.v1\x1a\x17google/rpc/status.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"E\n\x14LegacyDurabilitySpec\x12\x16\n\x0enum_replicated\x18\x01 \x01(\r\x12\x15\n\rnum_persisted\x18\x02 \x01(\r\"^\n\rMutationToken\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nvbucket_id\x18\x02 \x01(\r\x12\x14\n\x0cvbucket_uuid\x18\x03 \x01(\x04\x12\x0e\n\x06seq_no\x18\x04 \x01(\x04\"\xbb\x01\n\nGetRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0f\n\x07project\x18\x05 \x03(\t\x12=\n\x0b\x63ompression\x18\x06 \x01(\x0e\x32#.couchbase.kv.v1.CompressionEnabledH\x00\x88\x01\x01\x42\x0e\n\x0c_compression\"\xb2\x01\n\x0bGetResponse\x12\x1e\n\x14\x63ontent_uncompressed\x18\x01 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x03 \x01(\x04\x12*\n\x06\x65xpiry\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x63ontentJ\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"\x86\x02\n\x12GetAndTouchRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x31\n\x0b\x65xpiry_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\x06 \x01(\rH\x00\x12=\n\x0b\x63ompression\x18\x07 \x01(\x0e\x32#.couchbase.kv.v1.CompressionEnabledH\x01\x88\x01\x01\x42\x08\n\x06\x65xpiryB\x0e\n\x0c_compression\"\xba\x01\n\x13GetAndTouchResponse\x12\x1e\n\x14\x63ontent_uncompressed\x18\x01 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x03 \x01(\x04\x12*\n\x06\x65xpiry\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x63ontentJ\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"\xc9\x01\n\x11GetAndLockRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x16\n\x0elock_time_secs\x18\x05 \x01(\r\x12=\n\x0b\x63ompression\x18\x06 \x01(\x0e\x32#.couchbase.kv.v1.CompressionEnabledH\x00\x88\x01\x01\x42\x0e\n\x0c_compression\"\xb9\x01\n\x12GetAndLockResponse\x12\x1e\n\x14\x63ontent_uncompressed\x18\x01 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x07 \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x06 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x03 \x01(\x04\x12*\n\x06\x65xpiry\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x63ontentJ\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"k\n\rUnlockRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0b\n\x03\x63\x61s\x18\x05 \x01(\x04\"\x10\n\x0eUnlockResponse\"\xb1\x01\n\x0cTouchRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x31\n\x0b\x65xpiry_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\x06 \x01(\rH\x00\x42\x08\n\x06\x65xpiry\"T\n\rTouchResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"^\n\rExistsRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\"-\n\x0e\x45xistsResponse\x12\x0e\n\x06result\x18\x01 \x01(\x08\x12\x0b\n\x03\x63\x61s\x18\x02 \x01(\x04\"\xee\x02\n\rInsertRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x1e\n\x14\x63ontent_uncompressed\x18\x05 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\x0c \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x0b \x01(\r\x12\x31\n\x0b\x65xpiry_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x42\t\n\x07\x63ontentB\x08\n\x06\x65xpiryB\x13\n\x11_durability_levelJ\x04\x08\x06\x10\x07\"U\n\x0eInsertResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xb8\x03\n\rUpsertRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x1e\n\x14\x63ontent_uncompressed\x18\x05 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\r \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x0b \x01(\r\x12\x31\n\x0b\x65xpiry_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x01\x12(\n\x1bpreserve_expiry_on_existing\x18\x0c \x01(\x08H\x02\x88\x01\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x03\x88\x01\x01\x42\t\n\x07\x63ontentB\x08\n\x06\x65xpiryB\x1e\n\x1c_preserve_expiry_on_existingB\x13\n\x11_durability_levelJ\x04\x08\x06\x10\x07\"U\n\x0eUpsertResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\x89\x03\n\x0eReplaceRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x1e\n\x14\x63ontent_uncompressed\x18\x05 \x01(\x0cH\x00\x12\x1c\n\x12\x63ontent_compressed\x18\r \x01(\x0cH\x00\x12\x15\n\rcontent_flags\x18\x0c \x01(\r\x12\x10\n\x03\x63\x61s\x18\x07 \x01(\x04H\x02\x88\x01\x01\x12\x31\n\x0b\x65xpiry_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x15\n\x0b\x65xpiry_secs\x18\x0b \x01(\rH\x01\x12?\n\x10\x64urability_level\x18\n \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x03\x88\x01\x01\x42\t\n\x07\x63ontentB\x08\n\x06\x65xpiryB\x06\n\x04_casB\x13\n\x11_durability_levelJ\x04\x08\x06\x10\x07\"V\n\x0fReplaceResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xce\x01\n\rRemoveRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x10\n\x03\x63\x61s\x18\x05 \x01(\x04H\x00\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x07 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x01\x88\x01\x01\x42\x06\n\x04_casB\x13\n\x11_durability_level\"U\n\x0eRemoveResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xbc\x02\n\x10IncrementRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x05 \x01(\x04\x12\x31\n\x0b\x65xpiry_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x00\x12\x14\n\x07initial\x18\x07 \x01(\x03H\x01\x88\x01\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x42\x08\n\x06\x65xpiryB\n\n\x08_initialB\x13\n\x11_durability_level\"i\n\x11IncrementResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x03\x12\x36\n\x0emutation_token\x18\x03 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xbc\x02\n\x10\x44\x65\x63rementRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x05 \x01(\x04\x12\x31\n\x0b\x65xpiry_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\n \x01(\rH\x00\x12\x14\n\x07initial\x18\x07 \x01(\x03H\x01\x88\x01\x01\x12?\n\x10\x64urability_level\x18\t \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x42\x08\n\x06\x65xpiryB\n\n\x08_initialB\x13\n\x11_durability_level\"i\n\x11\x44\x65\x63rementResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x03\x12\x36\n\x0emutation_token\x18\x03 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xdf\x01\n\rAppendRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x05 \x01(\x0c\x12\x10\n\x03\x63\x61s\x18\x06 \x01(\x04H\x00\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x01\x88\x01\x01\x42\x06\n\x04_casB\x13\n\x11_durability_level\"U\n\x0e\x41ppendResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xe0\x01\n\x0ePrependRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x05 \x01(\x0c\x12\x10\n\x03\x63\x61s\x18\x06 \x01(\x04H\x00\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x01\x88\x01\x01\x42\x06\n\x04_casB\x13\n\x11_durability_level\"V\n\x0fPrependResponse\x12\x0b\n\x03\x63\x61s\x18\x01 \x01(\x04\x12\x36\n\x0emutation_token\x18\x02 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\"\xad\x04\n\x0fLookupInRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x34\n\x05specs\x18\x05 \x03(\x0b\x32%.couchbase.kv.v1.LookupInRequest.Spec\x12:\n\x05\x66lags\x18\x06 \x01(\x0b\x32&.couchbase.kv.v1.LookupInRequest.FlagsH\x00\x88\x01\x01\x1a\x95\x02\n\x04Spec\x12\x42\n\toperation\x18\x01 \x01(\x0e\x32/.couchbase.kv.v1.LookupInRequest.Spec.Operation\x12\x0c\n\x04path\x18\x02 \x01(\t\x12?\n\x05\x66lags\x18\x03 \x01(\x0b\x32+.couchbase.kv.v1.LookupInRequest.Spec.FlagsH\x00\x88\x01\x01\x1a%\n\x05\x46lags\x12\x12\n\x05xattr\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x08\n\x06_xattr\"I\n\tOperation\x12\x11\n\rOPERATION_GET\x10\x00\x12\x14\n\x10OPERATION_EXISTS\x10\x01\x12\x13\n\x0fOPERATION_COUNT\x10\x02\x42\x08\n\x06_flags\x1a\x37\n\x05\x46lags\x12\x1b\n\x0e\x61\x63\x63\x65ss_deleted\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_access_deletedB\x08\n\x06_flags\"\x93\x01\n\x10LookupInResponse\x12\x35\n\x05specs\x18\x01 \x03(\x0b\x32&.couchbase.kv.v1.LookupInResponse.Spec\x12\x0b\n\x03\x63\x61s\x18\x02 \x01(\x04\x1a;\n\x04Spec\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"\x97\t\n\x0fMutateInRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\x12\x34\n\x05specs\x18\x05 \x03(\x0b\x32%.couchbase.kv.v1.MutateInRequest.Spec\x12K\n\x0estore_semantic\x18\x06 \x01(\x0e\x32..couchbase.kv.v1.MutateInRequest.StoreSemanticH\x01\x88\x01\x01\x12?\n\x10\x64urability_level\x18\x08 \x01(\x0e\x32 .couchbase.kv.v1.DurabilityLevelH\x02\x88\x01\x01\x12\x10\n\x03\x63\x61s\x18\t \x01(\x04H\x03\x88\x01\x01\x12:\n\x05\x66lags\x18\n \x01(\x0b\x32&.couchbase.kv.v1.MutateInRequest.FlagsH\x04\x88\x01\x01\x12\x31\n\x0b\x65xpiry_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x15\n\x0b\x65xpiry_secs\x18\x0c \x01(\rH\x00\x1a\xf8\x03\n\x04Spec\x12\x42\n\toperation\x18\x01 \x01(\x0e\x32/.couchbase.kv.v1.MutateInRequest.Spec.Operation\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12?\n\x05\x66lags\x18\x04 \x01(\x0b\x32+.couchbase.kv.v1.MutateInRequest.Spec.FlagsH\x00\x88\x01\x01\x1aO\n\x05\x46lags\x12\x18\n\x0b\x63reate_path\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x12\n\x05xattr\x18\x02 \x01(\x08H\x01\x88\x01\x01\x42\x0e\n\x0c_create_pathB\x08\n\x06_xattr\"\xf0\x01\n\tOperation\x12\x14\n\x10OPERATION_INSERT\x10\x00\x12\x14\n\x10OPERATION_UPSERT\x10\x01\x12\x15\n\x11OPERATION_REPLACE\x10\x02\x12\x14\n\x10OPERATION_REMOVE\x10\x03\x12\x1a\n\x16OPERATION_ARRAY_APPEND\x10\x04\x12\x1b\n\x17OPERATION_ARRAY_PREPEND\x10\x05\x12\x1a\n\x16OPERATION_ARRAY_INSERT\x10\x06\x12\x1e\n\x1aOPERATION_ARRAY_ADD_UNIQUE\x10\x07\x12\x15\n\x11OPERATION_COUNTER\x10\x08\x42\x08\n\x06_flags\x1a\x37\n\x05\x46lags\x12\x1b\n\x0e\x61\x63\x63\x65ss_deleted\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x11\n\x0f_access_deleted\"a\n\rStoreSemantic\x12\x1a\n\x16STORE_SEMANTIC_REPLACE\x10\x00\x12\x19\n\x15STORE_SEMANTIC_UPSERT\x10\x01\x12\x19\n\x15STORE_SEMANTIC_INSERT\x10\x02\x42\x08\n\x06\x65xpiryB\x11\n\x0f_store_semanticB\x13\n\x11_durability_levelB\x06\n\x04_casB\x08\n\x06_flags\"\xb8\x01\n\x10MutateInResponse\x12\x35\n\x05specs\x18\x01 \x03(\x0b\x32&.couchbase.kv.v1.MutateInResponse.Spec\x12\x0b\n\x03\x63\x61s\x18\x02 \x01(\x04\x12\x36\n\x0emutation_token\x18\x03 \x01(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\x1a(\n\x04Spec\x12\x14\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\n\n\x08_content\"f\n\x15GetAllReplicasRequest\x12\x13\n\x0b\x62ucket_name\x18\x01 \x01(\t\x12\x12\n\nscope_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\"a\n\x16GetAllReplicasResponse\x12\x12\n\nis_replica\x18\x01 \x01(\x08\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\x12\x15\n\rcontent_flags\x18\x03 \x01(\r\x12\x0b\n\x03\x63\x61s\x18\x04 \x01(\x04*\x8f\x01\n\x0f\x44urabilityLevel\x12\x1d\n\x19\x44URABILITY_LEVEL_MAJORITY\x10\x00\x12\x33\n/DURABILITY_LEVEL_MAJORITY_AND_PERSIST_TO_ACTIVE\x10\x01\x12(\n$DURABILITY_LEVEL_PERSIST_TO_MAJORITY\x10\x02*V\n\x12\x43ompressionEnabled\x12 \n\x1c\x43OMPRESSION_ENABLED_OPTIONAL\x10\x00\x12\x1e\n\x1a\x43OMPRESSION_ENABLED_ALWAYS\x10\x01\x32\xf5\n\n\tKvService\x12\x42\n\x03Get\x12\x1b.couchbase.kv.v1.GetRequest\x1a\x1c.couchbase.kv.v1.GetResponse\"\x00\x12Z\n\x0bGetAndTouch\x12#.couchbase.kv.v1.GetAndTouchRequest\x1a$.couchbase.kv.v1.GetAndTouchResponse\"\x00\x12W\n\nGetAndLock\x12\".couchbase.kv.v1.GetAndLockRequest\x1a#.couchbase.kv.v1.GetAndLockResponse\"\x00\x12K\n\x06Unlock\x12\x1e.couchbase.kv.v1.UnlockRequest\x1a\x1f.couchbase.kv.v1.UnlockResponse\"\x00\x12H\n\x05Touch\x12\x1d.couchbase.kv.v1.TouchRequest\x1a\x1e.couchbase.kv.v1.TouchResponse\"\x00\x12K\n\x06\x45xists\x12\x1e.couchbase.kv.v1.ExistsRequest\x1a\x1f.couchbase.kv.v1.ExistsResponse\"\x00\x12K\n\x06Insert\x12\x1e.couchbase.kv.v1.InsertRequest\x1a\x1f.couchbase.kv.v1.InsertResponse\"\x00\x12K\n\x06Upsert\x12\x1e.couchbase.kv.v1.UpsertRequest\x1a\x1f.couchbase.kv.v1.UpsertResponse\"\x00\x12N\n\x07Replace\x12\x1f.couchbase.kv.v1.ReplaceRequest\x1a .couchbase.kv.v1.ReplaceResponse\"\x00\x12K\n\x06Remove\x12\x1e.couchbase.kv.v1.RemoveRequest\x1a\x1f.couchbase.kv.v1.RemoveResponse\"\x00\x12T\n\tIncrement\x12!.couchbase.kv.v1.IncrementRequest\x1a\".couchbase.kv.v1.IncrementResponse\"\x00\x12T\n\tDecrement\x12!.couchbase.kv.v1.DecrementRequest\x1a\".couchbase.kv.v1.DecrementResponse\"\x00\x12K\n\x06\x41ppend\x12\x1e.couchbase.kv.v1.AppendRequest\x1a\x1f.couchbase.kv.v1.AppendResponse\"\x00\x12N\n\x07Prepend\x12\x1f.couchbase.kv.v1.PrependRequest\x1a .couchbase.kv.v1.PrependResponse\"\x00\x12Q\n\x08LookupIn\x12 .couchbase.kv.v1.LookupInRequest\x1a!.couchbase.kv.v1.LookupInResponse\"\x00\x12Q\n\x08MutateIn\x12 .couchbase.kv.v1.MutateInRequest\x1a!.couchbase.kv.v1.MutateInResponse\"\x00\x12\x65\n\x0eGetAllReplicas\x12&.couchbase.kv.v1.GetAllReplicasRequest\x1a\'.couchbase.kv.v1.GetAllReplicasResponse\"\x00\x30\x01\x42\xda\x01\n\'com.couchbase.client.protostellar.kv.v1P\x01Z8github.com/couchbase/goprotostellar/genproto/kv_v1;kv_v1\xaa\x02\x1c\x43ouchbase.Protostellar.KV.V1\xca\x02&Couchbase\\Protostellar\\Generated\\KV\\V1\xea\x02*Couchbase::Protostellar::Generated::KV::V1b\x06proto3"
|
|
12
12
|
|
|
13
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
14
|
-
|
|
15
|
-
begin
|
|
16
|
-
pool.add_serialized_file(descriptor_data)
|
|
17
|
-
rescue TypeError => e
|
|
18
|
-
# Compatibility code: will be removed in the next major version.
|
|
19
|
-
require 'google/protobuf/descriptor_pb'
|
|
20
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
21
|
-
parsed.clear_dependency
|
|
22
|
-
serialized = parsed.class.encode(parsed)
|
|
23
|
-
file = pool.add_serialized_file(serialized)
|
|
24
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
25
|
-
imports = [
|
|
26
|
-
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
|
27
|
-
["google.rpc.Status", "google/rpc/status.proto"],
|
|
28
|
-
]
|
|
29
|
-
imports.each do |type_name, expected_filename|
|
|
30
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
31
|
-
if import_file.name != expected_filename
|
|
32
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
36
|
-
warn "This will become an error in the next major version."
|
|
37
|
-
end
|
|
13
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
14
|
+
pool.add_serialized_file(descriptor_data)
|
|
38
15
|
|
|
39
16
|
module Couchbase
|
|
40
17
|
module Protostellar
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# Source: couchbase/kv/v1/kv.proto for package 'Couchbase.Protostellar.Generated.KV.V1'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Key-Value (KV) Service
|
|
5
|
+
#
|
|
6
|
+
# Provides full key-value document operations for Couchbase, including
|
|
7
|
+
# CRUD, sub-document lookups and mutations, binary append/prepend,
|
|
8
|
+
# atomic counters, pessimistic locking, and replica reads.
|
|
9
|
+
# All operations are scoped to a bucket/scope/collection/key address.
|
|
3
10
|
|
|
4
11
|
require 'grpc'
|
|
5
12
|
require 'couchbase/protostellar/generated/kv/v1/kv_pb'
|
|
@@ -10,6 +17,9 @@ module Couchbase
|
|
|
10
17
|
module KV
|
|
11
18
|
module V1
|
|
12
19
|
module KvService
|
|
20
|
+
# KvService provides key-value document operations against a Couchbase cluster.
|
|
21
|
+
# Operations are organized into reads, mutations, counters, binary operations,
|
|
22
|
+
# sub-document operations, and replica reads.
|
|
13
23
|
class Service
|
|
14
24
|
|
|
15
25
|
include ::GRPC::GenericService
|
|
@@ -18,22 +28,59 @@ module Couchbase
|
|
|
18
28
|
self.unmarshal_class_method = :decode
|
|
19
29
|
self.service_name = 'couchbase.kv.v1.KvService'
|
|
20
30
|
|
|
31
|
+
# Get retrieves a document by key. Supports field-level projection via the
|
|
32
|
+
# `project` field and optional compressed responses.
|
|
21
33
|
rpc :Get, ::Couchbase::Protostellar::Generated::KV::V1::GetRequest, ::Couchbase::Protostellar::Generated::KV::V1::GetResponse
|
|
34
|
+
# GetAndTouch retrieves a document and simultaneously resets its expiry.
|
|
22
35
|
rpc :GetAndTouch, ::Couchbase::Protostellar::Generated::KV::V1::GetAndTouchRequest, ::Couchbase::Protostellar::Generated::KV::V1::GetAndTouchResponse
|
|
36
|
+
# GetAndLock retrieves a document and acquires a pessimistic lock for the
|
|
37
|
+
# specified duration. The lock must be released via Unlock or will
|
|
38
|
+
# auto-expire after lock_time_secs.
|
|
23
39
|
rpc :GetAndLock, ::Couchbase::Protostellar::Generated::KV::V1::GetAndLockRequest, ::Couchbase::Protostellar::Generated::KV::V1::GetAndLockResponse
|
|
40
|
+
# Unlock releases a pessimistic lock previously acquired by GetAndLock.
|
|
41
|
+
# Requires the CAS value returned by the locking operation.
|
|
24
42
|
rpc :Unlock, ::Couchbase::Protostellar::Generated::KV::V1::UnlockRequest, ::Couchbase::Protostellar::Generated::KV::V1::UnlockResponse
|
|
43
|
+
# Touch resets a document's expiry without retrieving its content.
|
|
25
44
|
rpc :Touch, ::Couchbase::Protostellar::Generated::KV::V1::TouchRequest, ::Couchbase::Protostellar::Generated::KV::V1::TouchResponse
|
|
45
|
+
# Exists checks whether a document exists without retrieving its content.
|
|
46
|
+
# Returns a boolean result and the current CAS.
|
|
26
47
|
rpc :Exists, ::Couchbase::Protostellar::Generated::KV::V1::ExistsRequest, ::Couchbase::Protostellar::Generated::KV::V1::ExistsResponse
|
|
48
|
+
# Insert creates a new document. Fails if the document already exists.
|
|
49
|
+
# Supports durability requirements.
|
|
27
50
|
rpc :Insert, ::Couchbase::Protostellar::Generated::KV::V1::InsertRequest, ::Couchbase::Protostellar::Generated::KV::V1::InsertResponse
|
|
51
|
+
# Upsert creates or replaces a document unconditionally.
|
|
52
|
+
# Supports preserving the existing expiry on update.
|
|
28
53
|
rpc :Upsert, ::Couchbase::Protostellar::Generated::KV::V1::UpsertRequest, ::Couchbase::Protostellar::Generated::KV::V1::UpsertResponse
|
|
54
|
+
# Replace updates an existing document. Fails if the document does not exist.
|
|
55
|
+
# Supports optimistic locking via optional CAS.
|
|
29
56
|
rpc :Replace, ::Couchbase::Protostellar::Generated::KV::V1::ReplaceRequest, ::Couchbase::Protostellar::Generated::KV::V1::ReplaceResponse
|
|
57
|
+
# Remove deletes a document. Supports optimistic locking via optional CAS
|
|
58
|
+
# and durability requirements.
|
|
30
59
|
rpc :Remove, ::Couchbase::Protostellar::Generated::KV::V1::RemoveRequest, ::Couchbase::Protostellar::Generated::KV::V1::RemoveResponse
|
|
60
|
+
# Increment atomically increments a counter document by the specified delta.
|
|
61
|
+
# If the document does not exist and an initial value is provided, it is
|
|
62
|
+
# created with that value.
|
|
31
63
|
rpc :Increment, ::Couchbase::Protostellar::Generated::KV::V1::IncrementRequest, ::Couchbase::Protostellar::Generated::KV::V1::IncrementResponse
|
|
64
|
+
# Decrement atomically decrements a counter document by the specified delta.
|
|
65
|
+
# If the document does not exist and an initial value is provided, it is
|
|
66
|
+
# created with that value.
|
|
32
67
|
rpc :Decrement, ::Couchbase::Protostellar::Generated::KV::V1::DecrementRequest, ::Couchbase::Protostellar::Generated::KV::V1::DecrementResponse
|
|
68
|
+
# Append appends raw bytes to the end of an existing document's value.
|
|
33
69
|
rpc :Append, ::Couchbase::Protostellar::Generated::KV::V1::AppendRequest, ::Couchbase::Protostellar::Generated::KV::V1::AppendResponse
|
|
70
|
+
# Prepend prepends raw bytes to the beginning of an existing document's
|
|
71
|
+
# value.
|
|
34
72
|
rpc :Prepend, ::Couchbase::Protostellar::Generated::KV::V1::PrependRequest, ::Couchbase::Protostellar::Generated::KV::V1::PrependResponse
|
|
73
|
+
# LookupIn performs one or more sub-document lookup operations (get, exists,
|
|
74
|
+
# count) on paths within a JSON document. Supports xattr and access_deleted
|
|
75
|
+
# flags.
|
|
35
76
|
rpc :LookupIn, ::Couchbase::Protostellar::Generated::KV::V1::LookupInRequest, ::Couchbase::Protostellar::Generated::KV::V1::LookupInResponse
|
|
77
|
+
# MutateIn performs one or more sub-document mutation operations on paths
|
|
78
|
+
# within a JSON document. Supports insert, upsert, replace, remove, array
|
|
79
|
+
# operations, and counters at the sub-document level.
|
|
36
80
|
rpc :MutateIn, ::Couchbase::Protostellar::Generated::KV::V1::MutateInRequest, ::Couchbase::Protostellar::Generated::KV::V1::MutateInResponse
|
|
81
|
+
# GetAllReplicas returns the document from the active node and all replica
|
|
82
|
+
# nodes as a server-streamed response. Each response indicates whether it
|
|
83
|
+
# is from a replica via the is_replica flag.
|
|
37
84
|
rpc :GetAllReplicas, ::Couchbase::Protostellar::Generated::KV::V1::GetAllReplicasRequest, stream(::Couchbase::Protostellar::Generated::KV::V1::GetAllReplicasResponse)
|
|
38
85
|
end
|
|
39
86
|
|
|
@@ -8,33 +8,10 @@ require 'google/protobuf/duration_pb'
|
|
|
8
8
|
require 'couchbase/protostellar/generated/kv/v1/kv_pb'
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
descriptor_data = "\n\x1e\x63ouchbase/query/v1/query.proto\x12\x12\x63ouchbase.query.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x18\x63ouchbase/kv/v1/kv.proto\"\
|
|
11
|
+
descriptor_data = "\n\x1e\x63ouchbase/query/v1/query.proto\x12\x12\x63ouchbase.query.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x18\x63ouchbase/kv/v1/kv.proto\"\xc8\x0c\n\x0cQueryRequest\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nscope_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\tstatement\x18\x03 \x01(\t\x12\x16\n\tread_only\x18\x04 \x01(\x08H\x02\x88\x01\x01\x12\x15\n\x08prepared\x18\x05 \x01(\x08H\x03\x88\x01\x01\x12K\n\x0etuning_options\x18\x06 \x01(\x0b\x32..couchbase.query.v1.QueryRequest.TuningOptionsH\x04\x88\x01\x01\x12\x1e\n\x11\x63lient_context_id\x18\x07 \x01(\tH\x05\x88\x01\x01\x12O\n\x10scan_consistency\x18\x08 \x01(\x0e\x32\x30.couchbase.query.v1.QueryRequest.ScanConsistencyH\x06\x88\x01\x01\x12\x1d\n\x15positional_parameters\x18\t \x03(\x0c\x12O\n\x10named_parameters\x18\n \x03(\x0b\x32\x35.couchbase.query.v1.QueryRequest.NamedParametersEntry\x12\x17\n\nflex_index\x18\x0b \x01(\x08H\x07\x88\x01\x01\x12\x1c\n\x0fpreserve_expiry\x18\x0c \x01(\x08H\x08\x88\x01\x01\x12\x37\n\x0f\x63onsistent_with\x18\r \x03(\x0b\x32\x1e.couchbase.kv.v1.MutationToken\x12O\n\x10\x64urability_level\x18\x0f \x01(\x0e\x32\x30.couchbase.query.v1.QueryRequest.DurabilityLevelH\t\x88\x01\x01\x12G\n\x0cprofile_mode\x18\x0e \x01(\x0e\x32,.couchbase.query.v1.QueryRequest.ProfileModeH\n\x88\x01\x01\x1a\xb4\x02\n\rTuningOptions\x12\x1c\n\x0fmax_parallelism\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1b\n\x0epipeline_batch\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x19\n\x0cpipeline_cap\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x31\n\tscan_wait\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationH\x03\x88\x01\x01\x12\x15\n\x08scan_cap\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x1c\n\x0f\x64isable_metrics\x18\x06 \x01(\x08H\x05\x88\x01\x01\x42\x12\n\x10_max_parallelismB\x11\n\x0f_pipeline_batchB\x0f\n\r_pipeline_capB\x0c\n\n_scan_waitB\x0b\n\t_scan_capB\x12\n\x10_disable_metrics\x1a\x36\n\x14NamedParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"V\n\x0fScanConsistency\x12 \n\x1cSCAN_CONSISTENCY_NOT_BOUNDED\x10\x00\x12!\n\x1dSCAN_CONSISTENCY_REQUEST_PLUS\x10\x01\"\xaa\x01\n\x0f\x44urabilityLevel\x12\x19\n\x15\x44URABILITY_LEVEL_NONE\x10\x00\x12\x1d\n\x19\x44URABILITY_LEVEL_MAJORITY\x10\x01\x12\x33\n/DURABILITY_LEVEL_MAJORITY_AND_PERSIST_TO_ACTIVE\x10\x02\x12(\n$DURABILITY_LEVEL_PERSIST_TO_MAJORITY\x10\x03\"V\n\x0bProfileMode\x12\x14\n\x10PROFILE_MODE_OFF\x10\x00\x12\x17\n\x13PROFILE_MODE_PHASES\x10\x01\x12\x18\n\x14PROFILE_MODE_TIMINGS\x10\x02\x42\x0e\n\x0c_bucket_nameB\r\n\x0b_scope_nameB\x0c\n\n_read_onlyB\x0b\n\t_preparedB\x11\n\x0f_tuning_optionsB\x14\n\x12_client_context_idB\x13\n\x11_scan_consistencyB\r\n\x0b_flex_indexB\x12\n\x10_preserve_expiryB\x13\n\x11_durability_levelB\x0f\n\r_profile_mode\"\xad\x07\n\rQueryResponse\x12\x0c\n\x04rows\x18\x01 \x03(\x0c\x12\x42\n\tmeta_data\x18\x02 \x01(\x0b\x32*.couchbase.query.v1.QueryResponse.MetaDataH\x00\x88\x01\x01\x1a\xbb\x06\n\x08MetaData\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x19\n\x11\x63lient_context_id\x18\x02 \x01(\t\x12H\n\x07metrics\x18\x03 \x01(\x0b\x32\x32.couchbase.query.v1.QueryResponse.MetaData.MetricsH\x00\x88\x01\x01\x12\x41\n\x06status\x18\x04 \x01(\x0e\x32\x31.couchbase.query.v1.QueryResponse.MetaData.Status\x12\x44\n\x08warnings\x18\x05 \x03(\x0b\x32\x32.couchbase.query.v1.QueryResponse.MetaData.Warning\x12\x14\n\x07profile\x18\x06 \x01(\x0cH\x01\x88\x01\x01\x12\x11\n\tsignature\x18\x07 \x01(\x0c\x1a(\n\x07Warning\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x1a\xf0\x01\n\x07Metrics\x12/\n\x0c\x65lapsed_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x31\n\x0e\x65xecution_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x14\n\x0cresult_count\x18\x03 \x01(\x04\x12\x13\n\x0bresult_size\x18\x04 \x01(\x04\x12\x16\n\x0emutation_count\x18\x05 \x01(\x04\x12\x12\n\nsort_count\x18\x06 \x01(\x04\x12\x13\n\x0b\x65rror_count\x18\x07 \x01(\x04\x12\x15\n\rwarning_count\x18\x08 \x01(\x04\"\xce\x01\n\x06Status\x12\x12\n\x0eSTATUS_RUNNING\x10\x00\x12\x12\n\x0eSTATUS_SUCCESS\x10\x01\x12\x11\n\rSTATUS_ERRORS\x10\x02\x12\x14\n\x10STATUS_COMPLETED\x10\x03\x12\x12\n\x0eSTATUS_STOPPED\x10\x04\x12\x12\n\x0eSTATUS_TIMEOUT\x10\x05\x12\x11\n\rSTATUS_CLOSED\x10\x06\x12\x10\n\x0cSTATUS_FATAL\x10\x07\x12\x12\n\x0eSTATUS_ABORTED\x10\x08\x12\x12\n\x0eSTATUS_UNKNOWN\x10\tB\n\n\x08_metricsB\n\n\x08_profileB\x0c\n\n_meta_data2`\n\x0cQueryService\x12P\n\x05Query\x12 .couchbase.query.v1.QueryRequest\x1a!.couchbase.query.v1.QueryResponse\"\x00\x30\x01\x42\xec\x01\n*com.couchbase.client.protostellar.query.v1P\x01Z>github.com/couchbase/goprotostellar/genproto/query_v1;query_v1\xaa\x02\x1f\x43ouchbase.Protostellar.Query.V1\xca\x02)Couchbase\\Protostellar\\Generated\\Query\\V1\xea\x02-Couchbase::Protostellar::Generated::Query::V1b\x06proto3"
|
|
12
12
|
|
|
13
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
14
|
-
|
|
15
|
-
begin
|
|
16
|
-
pool.add_serialized_file(descriptor_data)
|
|
17
|
-
rescue TypeError => e
|
|
18
|
-
# Compatibility code: will be removed in the next major version.
|
|
19
|
-
require 'google/protobuf/descriptor_pb'
|
|
20
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
21
|
-
parsed.clear_dependency
|
|
22
|
-
serialized = parsed.class.encode(parsed)
|
|
23
|
-
file = pool.add_serialized_file(serialized)
|
|
24
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
25
|
-
imports = [
|
|
26
|
-
["couchbase.kv.v1.MutationToken", "couchbase/kv/v1/kv.proto"],
|
|
27
|
-
["google.protobuf.Duration", "google/protobuf/duration.proto"],
|
|
28
|
-
]
|
|
29
|
-
imports.each do |type_name, expected_filename|
|
|
30
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
31
|
-
if import_file.name != expected_filename
|
|
32
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
36
|
-
warn "This will become an error in the next major version."
|
|
37
|
-
end
|
|
13
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
14
|
+
pool.add_serialized_file(descriptor_data)
|
|
38
15
|
|
|
39
16
|
module Couchbase
|
|
40
17
|
module Protostellar
|
|
@@ -44,6 +21,7 @@ module Couchbase
|
|
|
44
21
|
QueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest").msgclass
|
|
45
22
|
QueryRequest::TuningOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest.TuningOptions").msgclass
|
|
46
23
|
QueryRequest::ScanConsistency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest.ScanConsistency").enummodule
|
|
24
|
+
QueryRequest::DurabilityLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest.DurabilityLevel").enummodule
|
|
47
25
|
QueryRequest::ProfileMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryRequest.ProfileMode").enummodule
|
|
48
26
|
QueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryResponse").msgclass
|
|
49
27
|
QueryResponse::MetaData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.query.v1.QueryResponse.MetaData").msgclass
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# Source: couchbase/query/v1/query.proto for package 'Couchbase.Protostellar.Generated.Query.V1'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Query Service
|
|
5
|
+
#
|
|
6
|
+
# Provides N1QL query execution against a Couchbase cluster.
|
|
7
|
+
# Queries are submitted as statements and results are returned as a
|
|
8
|
+
# server-streamed sequence of row batches with optional metadata.
|
|
3
9
|
|
|
4
10
|
require 'grpc'
|
|
5
11
|
require 'couchbase/protostellar/generated/query/v1/query_pb'
|
|
@@ -10,6 +16,7 @@ module Couchbase
|
|
|
10
16
|
module Query
|
|
11
17
|
module V1
|
|
12
18
|
module QueryService
|
|
19
|
+
# QueryService provides N1QL (SQL++) query execution.
|
|
13
20
|
class Service
|
|
14
21
|
|
|
15
22
|
include ::GRPC::GenericService
|
|
@@ -18,6 +25,9 @@ module Couchbase
|
|
|
18
25
|
self.unmarshal_class_method = :decode
|
|
19
26
|
self.service_name = 'couchbase.query.v1.QueryService'
|
|
20
27
|
|
|
28
|
+
# Query executes a N1QL statement and streams back result rows and metadata.
|
|
29
|
+
# Results are delivered incrementally — rows arrive first, followed by a
|
|
30
|
+
# final response containing MetaData (status, metrics, warnings).
|
|
21
31
|
rpc :Query, ::Couchbase::Protostellar::Generated::Query::V1::QueryRequest, stream(::Couchbase::Protostellar::Generated::Query::V1::QueryResponse)
|
|
22
32
|
end
|
|
23
33
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: couchbase/routing/v2/routing.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
descriptor_data = "\n\"couchbase/routing/v2/routing.proto\x12\x14\x63ouchbase.routing.v2\"?\n\x13WatchRoutingRequest\x12\x18\n\x0b\x62ucket_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_bucket_name\"E\n\rServerRouting\x12\x19\n\x11num_local_servers\x18\x01 \x01(\r\x12\x19\n\x11num_group_servers\x18\x02 \x01(\r\"V\n\x0eVbucketRouting\x12\x14\n\x0cnum_vbuckets\x18\x01 \x01(\r\x12\x16\n\x0elocal_vbuckets\x18\x02 \x03(\r\x12\x16\n\x0egroup_vbuckets\x18\x03 \x03(\r\"\xa3\x04\n\x14WatchRoutingResponse\x12@\n\x0eserver_routing\x18\x01 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x00\x88\x01\x01\x12?\n\rviews_routing\x18\x02 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x01\x88\x01\x01\x12?\n\rquery_routing\x18\x03 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x02\x88\x01\x01\x12@\n\x0esearch_routing\x18\x04 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x03\x88\x01\x01\x12\x43\n\x11\x61nalytics_routing\x18\x05 \x01(\x0b\x32#.couchbase.routing.v2.ServerRoutingH\x04\x88\x01\x01\x12G\n\x14vbucket_data_routing\x18\x06 \x01(\x0b\x32$.couchbase.routing.v2.VbucketRoutingH\x05\x88\x01\x01\x42\x11\n\x0f_server_routingB\x10\n\x0e_views_routingB\x10\n\x0e_query_routingB\x11\n\x0f_search_routingB\x14\n\x12_analytics_routingB\x17\n\x15_vbucket_data_routing2{\n\x0eRoutingService\x12i\n\x0cWatchRouting\x12).couchbase.routing.v2.WatchRoutingRequest\x1a*.couchbase.routing.v2.WatchRoutingResponse\"\x00\x30\x01\x42\xf8\x01\n,com.couchbase.client.protostellar.routing.v2P\x01ZBgithub.com/couchbase/goprotostellar/genproto/routing_v2;routing_v2\xaa\x02!Couchbase.Protostellar.Routing.V2\xca\x02+Couchbase\\Protostellar\\Generated\\Routing\\V2\xea\x02/Couchbase::Protostellar::Generated::Routing::V2b\x06proto3"
|
|
9
|
+
|
|
10
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
11
|
+
pool.add_serialized_file(descriptor_data)
|
|
12
|
+
|
|
13
|
+
module Couchbase
|
|
14
|
+
module Protostellar
|
|
15
|
+
module Generated
|
|
16
|
+
module Routing
|
|
17
|
+
module V2
|
|
18
|
+
WatchRoutingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v2.WatchRoutingRequest").msgclass
|
|
19
|
+
ServerRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v2.ServerRouting").msgclass
|
|
20
|
+
VbucketRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v2.VbucketRouting").msgclass
|
|
21
|
+
WatchRoutingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.routing.v2.WatchRoutingResponse").msgclass
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# Source: couchbase/routing/v2/routing.proto for package 'Couchbase.Protostellar.Generated.Routing.V2'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Routing Service (v2)
|
|
5
|
+
#
|
|
6
|
+
# Provides cluster topology and routing information via a long-lived
|
|
7
|
+
# server-streamed connection. Clients use this to discover which
|
|
8
|
+
# services are available, how many servers serve each service, and
|
|
9
|
+
# the vbucket distribution for data routing.
|
|
10
|
+
|
|
11
|
+
require 'grpc'
|
|
12
|
+
require 'couchbase/protostellar/generated/routing/v2/routing_pb'
|
|
13
|
+
|
|
14
|
+
module Couchbase
|
|
15
|
+
module Protostellar
|
|
16
|
+
module Generated
|
|
17
|
+
module Routing
|
|
18
|
+
module V2
|
|
19
|
+
module RoutingService
|
|
20
|
+
# RoutingService provides cluster topology updates as a server-streamed
|
|
21
|
+
# response. The stream emits a new WatchRoutingResponse whenever the
|
|
22
|
+
# cluster topology changes.
|
|
23
|
+
class Service
|
|
24
|
+
|
|
25
|
+
include ::GRPC::GenericService
|
|
26
|
+
|
|
27
|
+
self.marshal_class_method = :encode
|
|
28
|
+
self.unmarshal_class_method = :decode
|
|
29
|
+
self.service_name = 'couchbase.routing.v2.RoutingService'
|
|
30
|
+
|
|
31
|
+
# WatchRouting opens a long-lived stream that delivers routing
|
|
32
|
+
# configuration updates. If bucket_name is specified, the response
|
|
33
|
+
# includes vbucket routing for that specific bucket.
|
|
34
|
+
rpc :WatchRouting, ::Couchbase::Protostellar::Generated::Routing::V2::WatchRoutingRequest, stream(::Couchbase::Protostellar::Generated::Routing::V2::WatchRoutingResponse)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
Stub = Service.rpc_stub_class
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|