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
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2024-Present Couchbase, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#pragma once
|
|
19
|
+
|
|
20
|
+
#include <cstdint>
|
|
21
|
+
#include <functional>
|
|
22
|
+
#include <string>
|
|
23
|
+
|
|
24
|
+
namespace couchbase
|
|
25
|
+
{
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Uniquely identifies a cluster node.
|
|
29
|
+
*
|
|
30
|
+
* On Couchbase Server 8.0.1+ the identifier is the server-assigned node UUID.
|
|
31
|
+
* On older releases, a stable opaque token is derived from the node's hostname
|
|
32
|
+
* and management port.
|
|
33
|
+
*
|
|
34
|
+
* The type is equality-comparable, ordered, and hashable.
|
|
35
|
+
*
|
|
36
|
+
* @since 1.3.2
|
|
37
|
+
* @uncommitted
|
|
38
|
+
*/
|
|
39
|
+
class node_id
|
|
40
|
+
{
|
|
41
|
+
public:
|
|
42
|
+
/**
|
|
43
|
+
* Creates an empty (invalid) node_id.
|
|
44
|
+
*
|
|
45
|
+
* @since 1.3.2
|
|
46
|
+
* @uncommitted
|
|
47
|
+
*/
|
|
48
|
+
node_id() = default;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* User-facing identifier string.
|
|
52
|
+
*
|
|
53
|
+
* Returns node_uuid when the server provides one, otherwise a stable
|
|
54
|
+
* hex-encoded hash derived from hostname and management port.
|
|
55
|
+
*
|
|
56
|
+
* @return opaque identifier string (empty for default-constructed instances)
|
|
57
|
+
*
|
|
58
|
+
* @since 1.3.2
|
|
59
|
+
* @uncommitted
|
|
60
|
+
*/
|
|
61
|
+
[[nodiscard]] auto id() const -> const std::string&;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The server-assigned node UUID (empty on servers before 8.0.1).
|
|
65
|
+
*
|
|
66
|
+
* @since 1.3.2
|
|
67
|
+
* @uncommitted
|
|
68
|
+
*/
|
|
69
|
+
[[nodiscard]] auto node_uuid() const -> const std::string&;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The hostname of the node.
|
|
73
|
+
*
|
|
74
|
+
* @since 1.3.2
|
|
75
|
+
* @uncommitted
|
|
76
|
+
*/
|
|
77
|
+
[[nodiscard]] auto hostname() const -> const std::string&;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The port of the node's key-value service.
|
|
81
|
+
*
|
|
82
|
+
* This reflects the port actually used by the client: the TLS port when the
|
|
83
|
+
* cluster connection is TLS-enabled, otherwise the plain port.
|
|
84
|
+
*
|
|
85
|
+
* @since 1.3.2
|
|
86
|
+
* @uncommitted
|
|
87
|
+
*/
|
|
88
|
+
[[nodiscard]] auto port() const -> std::uint16_t;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Returns true when the node_id was properly initialized (not default-constructed).
|
|
92
|
+
*
|
|
93
|
+
* @since 1.3.2
|
|
94
|
+
* @uncommitted
|
|
95
|
+
*/
|
|
96
|
+
explicit operator bool() const;
|
|
97
|
+
|
|
98
|
+
auto operator==(const node_id& other) const -> bool;
|
|
99
|
+
auto operator!=(const node_id& other) const -> bool;
|
|
100
|
+
auto operator<(const node_id& other) const -> bool;
|
|
101
|
+
|
|
102
|
+
private:
|
|
103
|
+
friend class internal_node_id;
|
|
104
|
+
|
|
105
|
+
node_id(std::string node_uuid, std::string hostname, std::uint16_t port);
|
|
106
|
+
|
|
107
|
+
std::string node_uuid_{};
|
|
108
|
+
std::string hostname_{};
|
|
109
|
+
std::uint16_t port_{ 0 };
|
|
110
|
+
// Computed once at construction: node_uuid_ if non-empty, otherwise a
|
|
111
|
+
// deterministic hex-encoded CRC32 hash of "hostname:port".
|
|
112
|
+
std::string id_{};
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
} // namespace couchbase
|
|
116
|
+
|
|
117
|
+
template<>
|
|
118
|
+
struct std::hash<couchbase::node_id> {
|
|
119
|
+
auto operator()(const couchbase::node_id& nid) const noexcept -> std::size_t
|
|
120
|
+
{
|
|
121
|
+
return std::hash<std::string>{}(nid.id());
|
|
122
|
+
}
|
|
123
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2024-Present Couchbase, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#pragma once
|
|
19
|
+
|
|
20
|
+
#include <couchbase/common_options.hxx>
|
|
21
|
+
#include <couchbase/error.hxx>
|
|
22
|
+
#include <couchbase/node_id.hxx>
|
|
23
|
+
|
|
24
|
+
#include <functional>
|
|
25
|
+
|
|
26
|
+
namespace couchbase
|
|
27
|
+
{
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Options for @ref collection#node_id_for().
|
|
31
|
+
*
|
|
32
|
+
* @since 1.3.2
|
|
33
|
+
* @uncommitted
|
|
34
|
+
*/
|
|
35
|
+
struct node_id_for_options : public common_options<node_id_for_options> {
|
|
36
|
+
/**
|
|
37
|
+
* Immutable value object representing consistent options.
|
|
38
|
+
*
|
|
39
|
+
* @since 1.3.2
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
struct built : public common_options<node_id_for_options>::built {
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Validates options and returns them as an immutable value.
|
|
47
|
+
*
|
|
48
|
+
* @return consistent options as an immutable value
|
|
49
|
+
*
|
|
50
|
+
* @since 1.3.2
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
[[nodiscard]] auto build() const -> built
|
|
54
|
+
{
|
|
55
|
+
return { build_common_options() };
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
using node_id_for_handler = std::function<void(error, node_id)>;
|
|
60
|
+
|
|
61
|
+
} // namespace couchbase
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2024-Present Couchbase, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#pragma once
|
|
19
|
+
|
|
20
|
+
#include <couchbase/common_options.hxx>
|
|
21
|
+
#include <couchbase/error.hxx>
|
|
22
|
+
#include <couchbase/node_id.hxx>
|
|
23
|
+
|
|
24
|
+
#include <functional>
|
|
25
|
+
#include <vector>
|
|
26
|
+
|
|
27
|
+
namespace couchbase
|
|
28
|
+
{
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Options for @ref collection#node_ids().
|
|
32
|
+
*
|
|
33
|
+
* @since 1.3.2
|
|
34
|
+
* @uncommitted
|
|
35
|
+
*/
|
|
36
|
+
struct node_ids_options : public common_options<node_ids_options> {
|
|
37
|
+
/**
|
|
38
|
+
* Immutable value object representing consistent options.
|
|
39
|
+
*
|
|
40
|
+
* @since 1.3.2
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
struct built : public common_options<node_ids_options>::built {
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Validates options and returns them as an immutable value.
|
|
48
|
+
*
|
|
49
|
+
* @return consistent options as an immutable value
|
|
50
|
+
*
|
|
51
|
+
* @since 1.3.2
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
[[nodiscard]] auto build() const -> built
|
|
55
|
+
{
|
|
56
|
+
return { build_common_options() };
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
using node_ids_handler = std::function<void(error, std::vector<node_id>)>;
|
|
61
|
+
|
|
62
|
+
} // namespace couchbase
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
#pragma once
|
|
19
19
|
|
|
20
20
|
#include <couchbase/cas.hxx>
|
|
21
|
+
#include <couchbase/node_id.hxx>
|
|
22
|
+
|
|
23
|
+
#include <utility>
|
|
21
24
|
|
|
22
25
|
namespace couchbase
|
|
23
26
|
{
|
|
@@ -48,6 +51,19 @@ public:
|
|
|
48
51
|
{
|
|
49
52
|
}
|
|
50
53
|
|
|
54
|
+
/**
|
|
55
|
+
* @param cas
|
|
56
|
+
* @param node_id identity of the node that served the request
|
|
57
|
+
*
|
|
58
|
+
* @since 1.3.2
|
|
59
|
+
* @uncommitted
|
|
60
|
+
*/
|
|
61
|
+
result(couchbase::cas cas, couchbase::node_id node_id)
|
|
62
|
+
: cas_(cas)
|
|
63
|
+
, node_id_(std::move(node_id))
|
|
64
|
+
{
|
|
65
|
+
}
|
|
66
|
+
|
|
51
67
|
/**
|
|
52
68
|
* @return
|
|
53
69
|
*
|
|
@@ -59,8 +75,34 @@ public:
|
|
|
59
75
|
return cas_;
|
|
60
76
|
}
|
|
61
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Returns the identity of the cluster node that served this request.
|
|
80
|
+
*
|
|
81
|
+
* The returned node_id is default-constructed (falsy) when the node
|
|
82
|
+
* could not be determined.
|
|
83
|
+
*
|
|
84
|
+
* @return identity of the serving node
|
|
85
|
+
*
|
|
86
|
+
* @since 1.3.2
|
|
87
|
+
* @uncommitted
|
|
88
|
+
*/
|
|
89
|
+
[[nodiscard]] auto node_id() const -> const couchbase::node_id&
|
|
90
|
+
{
|
|
91
|
+
return node_id_;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @since 1.3.2
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
void node_id(couchbase::node_id id)
|
|
99
|
+
{
|
|
100
|
+
node_id_ = std::move(id);
|
|
101
|
+
}
|
|
102
|
+
|
|
62
103
|
private:
|
|
63
104
|
couchbase::cas cas_{ 0U };
|
|
105
|
+
couchbase::node_id node_id_{};
|
|
64
106
|
};
|
|
65
107
|
|
|
66
108
|
} // namespace couchbase
|
data/ext/rcb_crud.cxx
CHANGED
|
@@ -734,6 +734,7 @@ cb_Backend_document_append(VALUE self,
|
|
|
734
734
|
cb_extract_content(req, content);
|
|
735
735
|
cb_extract_timeout(req, options);
|
|
736
736
|
cb_extract_durability_level(req, options);
|
|
737
|
+
cb_extract_cas(req, options);
|
|
737
738
|
|
|
738
739
|
auto parent_span = cb_create_parent_span(req, self);
|
|
739
740
|
|
|
@@ -807,6 +808,7 @@ cb_Backend_document_prepend(VALUE self,
|
|
|
807
808
|
cb_extract_content(req, content);
|
|
808
809
|
cb_extract_timeout(req, options);
|
|
809
810
|
cb_extract_durability_level(req, options);
|
|
811
|
+
cb_extract_cas(req, options);
|
|
810
812
|
|
|
811
813
|
auto parent_span = cb_create_parent_span(req, self);
|
|
812
814
|
|
data/ext/rcb_logger.cxx
CHANGED
|
@@ -184,19 +184,19 @@ cb_Backend_set_log_level(VALUE /* self */, VALUE log_level)
|
|
|
184
184
|
{
|
|
185
185
|
Check_Type(log_level, T_SYMBOL);
|
|
186
186
|
if (ID type = rb_sym2id(log_level); type == rb_intern("trace")) {
|
|
187
|
-
|
|
187
|
+
core::logger::set_log_levels(core::logger::level::trace);
|
|
188
188
|
} else if (type == rb_intern("debug")) {
|
|
189
|
-
|
|
189
|
+
core::logger::set_log_levels(core::logger::level::debug);
|
|
190
190
|
} else if (type == rb_intern("info")) {
|
|
191
|
-
|
|
191
|
+
core::logger::set_log_levels(core::logger::level::info);
|
|
192
192
|
} else if (type == rb_intern("warn")) {
|
|
193
|
-
|
|
193
|
+
core::logger::set_log_levels(core::logger::level::warn);
|
|
194
194
|
} else if (type == rb_intern("error")) {
|
|
195
|
-
|
|
195
|
+
core::logger::set_log_levels(core::logger::level::err);
|
|
196
196
|
} else if (type == rb_intern("critical")) {
|
|
197
|
-
|
|
197
|
+
core::logger::set_log_levels(core::logger::level::critical);
|
|
198
198
|
} else if (type == rb_intern("off")) {
|
|
199
|
-
|
|
199
|
+
core::logger::set_log_levels(core::logger::level::off);
|
|
200
200
|
} else {
|
|
201
201
|
rb_raise(rb_eArgError, "Unsupported log level type: %+" PRIsVALUE, log_level);
|
|
202
202
|
return Qnil;
|
|
@@ -207,23 +207,21 @@ cb_Backend_set_log_level(VALUE /* self */, VALUE log_level)
|
|
|
207
207
|
static VALUE
|
|
208
208
|
cb_Backend_get_log_level(VALUE /* self */)
|
|
209
209
|
{
|
|
210
|
-
switch (
|
|
211
|
-
case
|
|
210
|
+
switch (core::logger::get_lowest_log_level()) {
|
|
211
|
+
case core::logger::level::trace:
|
|
212
212
|
return rb_id2sym(rb_intern("trace"));
|
|
213
|
-
case
|
|
213
|
+
case core::logger::level::debug:
|
|
214
214
|
return rb_id2sym(rb_intern("debug"));
|
|
215
|
-
case
|
|
215
|
+
case core::logger::level::info:
|
|
216
216
|
return rb_id2sym(rb_intern("info"));
|
|
217
|
-
case
|
|
217
|
+
case core::logger::level::warn:
|
|
218
218
|
return rb_id2sym(rb_intern("warn"));
|
|
219
|
-
case
|
|
219
|
+
case core::logger::level::err:
|
|
220
220
|
return rb_id2sym(rb_intern("error"));
|
|
221
|
-
case
|
|
221
|
+
case core::logger::level::critical:
|
|
222
222
|
return rb_id2sym(rb_intern("critical"));
|
|
223
|
-
case
|
|
223
|
+
case core::logger::level::off:
|
|
224
224
|
return rb_id2sym(rb_intern("off"));
|
|
225
|
-
case spdlog::level::n_levels:
|
|
226
|
-
return Qnil;
|
|
227
225
|
}
|
|
228
226
|
return Qnil;
|
|
229
227
|
}
|
|
@@ -38,6 +38,7 @@ module Couchbase
|
|
|
38
38
|
@options = options
|
|
39
39
|
@cas = 0
|
|
40
40
|
@observability = @collection.instance_variable_get(:@observability)
|
|
41
|
+
@observability = Observability::Wrapper.new if @observability.nil?
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
# Calls the given block once for each element in the list, passing that element as a parameter.
|
|
@@ -38,6 +38,7 @@ module Couchbase
|
|
|
38
38
|
@options = options
|
|
39
39
|
@cas = 0
|
|
40
40
|
@observability = collection.instance_variable_get(:@observability)
|
|
41
|
+
@observability = Observability::Wrapper.new if @observability.nil?
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
# Calls the given block once for each element in the map, passing that element as a parameter.
|
|
@@ -38,6 +38,7 @@ module Couchbase
|
|
|
38
38
|
@options = options
|
|
39
39
|
@cas = 0
|
|
40
40
|
@observability = @collection.instance_variable_get(:@observability)
|
|
41
|
+
@observability = Observability::Wrapper.new if @observability.nil?
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
# Calls the given block once for each element in the queue, passing that element as a parameter.
|
|
@@ -38,6 +38,7 @@ module Couchbase
|
|
|
38
38
|
@options = options
|
|
39
39
|
@cas = 0
|
|
40
40
|
@observability = @collection.instance_variable_get(:@observability)
|
|
41
|
+
@observability = Observability::Wrapper.new if @observability.nil?
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
# Calls the given block once for each element in the set, passing that element as a parameter.
|
data/lib/couchbase/errors.rb
CHANGED
|
@@ -35,7 +35,7 @@ module Couchbase
|
|
|
35
35
|
format = TranscoderFlags.decode(flags).format
|
|
36
36
|
raise Error::DecodingFailure, "Unable to decode #{format} with the JsonTranscoder" unless format == :json || format.nil?
|
|
37
37
|
|
|
38
|
-
JSON.parse(blob) unless blob
|
|
38
|
+
JSON.parse(blob) unless blob && blob.empty?
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
end
|
data/lib/couchbase/options.rb
CHANGED
|
@@ -107,7 +107,7 @@ module Couchbase
|
|
|
107
107
|
# @api private
|
|
108
108
|
# @return [Boolean]
|
|
109
109
|
def need_projected_get?
|
|
110
|
-
@with_expiry || !@projections
|
|
110
|
+
@with_expiry || (!@projections.nil? && !@projections.empty?)
|
|
111
111
|
end
|
|
112
112
|
|
|
113
113
|
# @api private
|
|
@@ -116,7 +116,7 @@ module Couchbase
|
|
|
116
116
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
117
117
|
}
|
|
118
118
|
options.update(with_expiry: true) if @with_expiry
|
|
119
|
-
unless @projections
|
|
119
|
+
unless @projections.nil? || @projections.empty?
|
|
120
120
|
options.update({
|
|
121
121
|
projections: @projections,
|
|
122
122
|
preserve_array_indexes: @preserve_array_indexes,
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
require_relative "error_handling"
|
|
18
18
|
|
|
19
|
-
require_relative "generated/routing/v1/routing_services_pb"
|
|
20
19
|
require_relative "generated/kv/v1/kv_services_pb"
|
|
21
20
|
require_relative "generated/query/v1/query_services_pb"
|
|
22
21
|
require_relative "generated/search/v1/search_services_pb"
|
|
@@ -37,7 +36,6 @@ module Couchbase
|
|
|
37
36
|
@timeouts = timeouts
|
|
38
37
|
|
|
39
38
|
@stubs = {
|
|
40
|
-
routing: Generated::Routing::V1::RoutingService::Stub.new(host, credentials, channel_override: @channel),
|
|
41
39
|
kv: Generated::KV::V1::KvService::Stub.new(host, credentials, channel_override: @channel),
|
|
42
40
|
query: Generated::Query::V1::QueryService::Stub.new(host, credentials, channel_override: @channel),
|
|
43
41
|
search: Generated::Search::V1::SearchService::Stub.new(host, credentials, channel_override: @channel),
|
|
@@ -155,6 +155,10 @@ module Couchbase
|
|
|
155
155
|
raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support ping"
|
|
156
156
|
end
|
|
157
157
|
|
|
158
|
+
def search_indexes
|
|
159
|
+
raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support search index management"
|
|
160
|
+
end
|
|
161
|
+
|
|
158
162
|
private
|
|
159
163
|
|
|
160
164
|
def initialize(host, options = ConnectOptions.new)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: couchbase/admin/analytics/v1/analytics.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
descriptor_data = "\n,couchbase/admin/analytics/v1/analytics.proto\x12\x1c\x63ouchbase.admin.analytics.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x96\x0b\n\x11\x43reateLinkRequest\x12\x1c\n\x14\x61nalytics_scope_name\x18\x01 \x01(\t\x12\x11\n\tlink_name\x18\x02 \x01(\t\x12W\n\x0e\x63ouchbase_link\x18\x03 \x01(\x0b\x32=.couchbase.admin.analytics.v1.CreateLinkRequest.CouchbaseLinkH\x00\x12I\n\x07s3_link\x18\x04 \x01(\x0b\x32\x36.couchbase.admin.analytics.v1.CreateLinkRequest.S3LinkH\x00\x12W\n\x0e\x61zureblob_link\x18\x05 \x01(\x0b\x32=.couchbase.admin.analytics.v1.CreateLinkRequest.AzureBlobLinkH\x00\x12K\n\x08gcs_link\x18\x06 \x01(\x0b\x32\x37.couchbase.admin.analytics.v1.CreateLinkRequest.GcsLinkH\x00\x1a\xc3\x02\n\rCouchbaseLink\x12\x10\n\x08hostname\x18\x01 \x01(\t\x12N\n\x0f\x65ncryption_mode\x18\x02 \x01(\x0e\x32\x35.couchbase.admin.analytics.v1.CouchbaseEncryptionMode\x12\x15\n\x08username\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08password\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x63\x65rtificate\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12\x63lient_certificate\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x17\n\nclient_key\x18\x07 \x01(\tH\x04\x88\x01\x01\x42\x0b\n\t_usernameB\x0b\n\t_passwordB\x0e\n\x0c_certificateB\x15\n\x13_client_certificateB\r\n\x0b_client_key\x1a\xac\x01\n\x06S3Link\x12\x15\n\raccess_key_id\x18\x01 \x01(\t\x12\x19\n\x11secret_access_key\x18\x02 \x01(\t\x12\x1a\n\rsession_token\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x1d\n\x10service_endpoint\x18\x05 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_session_tokenB\x13\n\x11_service_endpoint\x1a\xc9\x03\n\rAzureBlobLink\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x61\x63\x63ount_key\x18\x02 \x01(\tH\x01\x88\x01\x01\x12$\n\x17shared_access_signature\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13managed_identity_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x16\n\tclient_id\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x16\n\ttenant_id\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x1a\n\rclient_secret\x18\x07 \x01(\tH\x06\x88\x01\x01\x12(\n\x1b\x63lient_certificate_password\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x15\n\x08\x65ndpoint\x18\t \x01(\tH\x08\x88\x01\x01\x42\x0f\n\r_account_nameB\x0e\n\x0c_account_keyB\x1a\n\x18_shared_access_signatureB\x16\n\x14_managed_identity_idB\x0c\n\n_client_idB\x0c\n\n_tenant_idB\x10\n\x0e_client_secretB\x1e\n\x1c_client_certificate_passwordB\x0b\n\t_endpoint\x1a=\n\x07GcsLink\x12\x1d\n\x10json_credentials\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x13\n\x11_json_credentialsB\x06\n\x04link\"\x14\n\x12\x43reateLinkResponse\"A\n\x0eGetLinkRequest\x12\x1c\n\x14\x61nalytics_scope_name\x18\x01 \x01(\t\x12\x11\n\tlink_name\x18\x02 \x01(\t\"\xe9\x07\n\x0fGetLinkResponse\x12U\n\x0e\x63ouchbase_link\x18\x01 \x01(\x0b\x32;.couchbase.admin.analytics.v1.GetLinkResponse.CouchbaseLinkH\x00\x12G\n\x07s3_link\x18\x02 \x01(\x0b\x32\x34.couchbase.admin.analytics.v1.GetLinkResponse.S3LinkH\x00\x12U\n\x0e\x61zureblob_link\x18\x03 \x01(\x0b\x32;.couchbase.admin.analytics.v1.GetLinkResponse.AzureBlobLinkH\x00\x12I\n\x08gcs_link\x18\x04 \x01(\x0b\x32\x35.couchbase.admin.analytics.v1.GetLinkResponse.GcsLinkH\x00\x1a\x86\x02\n\rCouchbaseLink\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12\x17\n\x0f\x61\x63tive_hostname\x18\x02 \x01(\t\x12\x1a\n\x12\x62ootstrap_hostname\x18\x03 \x01(\t\x12&\n\x1eis_bootstrap_alternate_address\x18\x04 \x01(\x08\x12\x18\n\x0b\x63\x65rtificate\x18\x05 \x01(\tH\x00\x88\x01\x01\x12N\n\x0f\x65ncryption_mode\x18\x06 \x01(\x0e\x32\x35.couchbase.admin.analytics.v1.CouchbaseEncryptionMode\x12\x10\n\x08username\x18\x07 \x01(\tB\x0e\n\x0c_certificate\x1a\x63\n\x06S3Link\x12\x15\n\raccess_key_id\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t\x12\x1d\n\x10service_endpoint\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x13\n\x11_service_endpoint\x1a\xd3\x01\n\rAzureBlobLink\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tclient_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x08\x65ndpoint\x18\x03 \x01(\t\x12 \n\x13managed_identity_id\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x16\n\ttenant_id\x18\x05 \x01(\tH\x03\x88\x01\x01\x42\x0f\n\r_account_nameB\x0c\n\n_client_idB\x16\n\x14_managed_identity_idB\x0c\n\n_tenant_id\x1aH\n\x07GcsLink\x12+\n#use_application_default_credentials\x18\x01 \x01(\x08\x12\x10\n\x08\x65ndpoint\x18\x02 \x01(\tB\x06\n\x04link\"\x96\x0b\n\x11UpdateLinkRequest\x12\x1c\n\x14\x61nalytics_scope_name\x18\x01 \x01(\t\x12\x11\n\tlink_name\x18\x02 \x01(\t\x12W\n\x0e\x63ouchbase_link\x18\x03 \x01(\x0b\x32=.couchbase.admin.analytics.v1.UpdateLinkRequest.CouchbaseLinkH\x00\x12I\n\x07s3_link\x18\x04 \x01(\x0b\x32\x36.couchbase.admin.analytics.v1.UpdateLinkRequest.S3LinkH\x00\x12W\n\x0e\x61zureblob_link\x18\x05 \x01(\x0b\x32=.couchbase.admin.analytics.v1.UpdateLinkRequest.AzureBlobLinkH\x00\x12K\n\x08gcs_link\x18\x06 \x01(\x0b\x32\x37.couchbase.admin.analytics.v1.UpdateLinkRequest.GcsLinkH\x00\x1a\xc3\x02\n\rCouchbaseLink\x12\x10\n\x08hostname\x18\x01 \x01(\t\x12N\n\x0f\x65ncryption_mode\x18\x02 \x01(\x0e\x32\x35.couchbase.admin.analytics.v1.CouchbaseEncryptionMode\x12\x15\n\x08username\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08password\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0b\x63\x65rtificate\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12\x63lient_certificate\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x17\n\nclient_key\x18\x07 \x01(\tH\x04\x88\x01\x01\x42\x0b\n\t_usernameB\x0b\n\t_passwordB\x0e\n\x0c_certificateB\x15\n\x13_client_certificateB\r\n\x0b_client_key\x1a\xac\x01\n\x06S3Link\x12\x15\n\raccess_key_id\x18\x01 \x01(\t\x12\x19\n\x11secret_access_key\x18\x02 \x01(\t\x12\x1a\n\rsession_token\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x1d\n\x10service_endpoint\x18\x05 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_session_tokenB\x13\n\x11_service_endpoint\x1a\xc9\x03\n\rAzureBlobLink\x12\x19\n\x0c\x61\x63\x63ount_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x61\x63\x63ount_key\x18\x02 \x01(\tH\x01\x88\x01\x01\x12$\n\x17shared_access_signature\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13managed_identity_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x16\n\tclient_id\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x16\n\ttenant_id\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x1a\n\rclient_secret\x18\x07 \x01(\tH\x06\x88\x01\x01\x12(\n\x1b\x63lient_certificate_password\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x15\n\x08\x65ndpoint\x18\t \x01(\tH\x08\x88\x01\x01\x42\x0f\n\r_account_nameB\x0e\n\x0c_account_keyB\x1a\n\x18_shared_access_signatureB\x16\n\x14_managed_identity_idB\x0c\n\n_client_idB\x0c\n\n_tenant_idB\x10\n\x0e_client_secretB\x1e\n\x1c_client_certificate_passwordB\x0b\n\t_endpoint\x1a=\n\x07GcsLink\x12\x1d\n\x10json_credentials\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x13\n\x11_json_credentialsB\x06\n\x04link\"\x14\n\x12UpdateLinkResponse\"D\n\x11\x44\x65leteLinkRequest\x12\x1c\n\x14\x61nalytics_scope_name\x18\x01 \x01(\t\x12\x11\n\tlink_name\x18\x02 \x01(\t\"\x14\n\x12\x44\x65leteLinkResponse\"\x1b\n\x19GetIngestionStatusRequest\"\x95\x06\n\x1aGetIngestionStatusResponse\x12L\n\x05links\x18\x01 \x03(\x0b\x32=.couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link\x1a\xa8\x05\n\x04Link\x12\x11\n\tlink_name\x18\x01 \x01(\t\x12\x1c\n\x14\x61nalytics_scope_name\x18\x02 \x01(\t\x12\x38\n\x06status\x18\x03 \x01(\x0e\x32(.couchbase.admin.analytics.v1.LinkStatus\x12S\n\x06states\x18\x04 \x03(\x0b\x32\x43.couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link.State\x1a\xdf\x03\n\x05State\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08progress\x18\x02 \x01(\x01\x12\x18\n\x0btime_lag_ms\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x1c\n\x0fitems_processed\x18\x04 \x01(\x03H\x01\x88\x01\x01\x12\x1b\n\x0eseqno_advances\x18\x05 \x01(\x03H\x02\x88\x01\x01\x12Y\n\x06scopes\x18\x06 \x03(\x0b\x32I.couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link.State.Scope\x1a\xad\x01\n\x05Scope\x12\x12\n\nscope_name\x18\x01 \x01(\t\x12i\n\x0b\x63ollections\x18\x02 \x03(\x0b\x32T.couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link.State.Scope.Collection\x1a%\n\nCollection\x12\x17\n\x0f\x63ollection_name\x18\x01 \x01(\tB\x0e\n\x0c_time_lag_msB\x12\n\x10_items_processedB\x11\n\x0f_seqno_advances*\x8d\x01\n\nLinkStatus\x12\x17\n\x13LINK_STATUS_UNKNOWN\x10\x00\x12\x17\n\x13LINK_STATUS_HEALTHY\x10\x01\x12\x17\n\x13LINK_STATUS_STOPPED\x10\x02\x12\x19\n\x15LINK_STATUS_UNHEALTHY\x10\x03\x12\x19\n\x15LINK_STATUS_SUSPENDED\x10\x04*\x85\x01\n\x17\x43ouchbaseEncryptionMode\x12\"\n\x1e\x43OUCHBASE_ENCRYPTION_MODE_NONE\x10\x00\x12\"\n\x1e\x43OUCHBASE_ENCRYPTION_MODE_HALF\x10\x01\x12\"\n\x1e\x43OUCHBASE_ENCRYPTION_MODE_FULL\x10\x02\x32\xe6\x04\n\x15\x41nalyticsAdminService\x12q\n\nCreateLink\x12/.couchbase.admin.analytics.v1.CreateLinkRequest\x1a\x30.couchbase.admin.analytics.v1.CreateLinkResponse\"\x00\x12h\n\x07GetLink\x12,.couchbase.admin.analytics.v1.GetLinkRequest\x1a-.couchbase.admin.analytics.v1.GetLinkResponse\"\x00\x12q\n\nUpdateLink\x12/.couchbase.admin.analytics.v1.UpdateLinkRequest\x1a\x30.couchbase.admin.analytics.v1.UpdateLinkResponse\"\x00\x12q\n\nDeleteLink\x12/.couchbase.admin.analytics.v1.DeleteLinkRequest\x1a\x30.couchbase.admin.analytics.v1.DeleteLinkResponse\"\x00\x12\x89\x01\n\x12GetIngestionStatus\x12\x37.couchbase.admin.analytics.v1.GetIngestionStatusRequest\x1a\x38.couchbase.admin.analytics.v1.GetIngestionStatusResponse\"\x00\x42\xa9\x02\n4com.couchbase.client.protostellar.admin.analytics.v1P\x01ZRgithub.com/couchbase/goprotostellar/genproto/admin_analytics_v1;admin_analytics_v1\xaa\x02)Couchbase.Protostellar.Admin.Analytics.V1\xca\x02\x33\x43ouchbase\\Protostellar\\Generated\\Admin\\Analytics\\V1\xea\x02\x38\x43ouchbase::Protostellar::Generated::Admin::Analytics::V1b\x06proto3"
|
|
11
|
+
|
|
12
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
|
14
|
+
|
|
15
|
+
module Couchbase
|
|
16
|
+
module Protostellar
|
|
17
|
+
module Generated
|
|
18
|
+
module Admin
|
|
19
|
+
module Analytics
|
|
20
|
+
module V1
|
|
21
|
+
CreateLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CreateLinkRequest").msgclass
|
|
22
|
+
CreateLinkRequest::CouchbaseLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CreateLinkRequest.CouchbaseLink").msgclass
|
|
23
|
+
CreateLinkRequest::S3Link = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CreateLinkRequest.S3Link").msgclass
|
|
24
|
+
CreateLinkRequest::AzureBlobLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CreateLinkRequest.AzureBlobLink").msgclass
|
|
25
|
+
CreateLinkRequest::GcsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CreateLinkRequest.GcsLink").msgclass
|
|
26
|
+
CreateLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CreateLinkResponse").msgclass
|
|
27
|
+
GetLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetLinkRequest").msgclass
|
|
28
|
+
GetLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetLinkResponse").msgclass
|
|
29
|
+
GetLinkResponse::CouchbaseLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetLinkResponse.CouchbaseLink").msgclass
|
|
30
|
+
GetLinkResponse::S3Link = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetLinkResponse.S3Link").msgclass
|
|
31
|
+
GetLinkResponse::AzureBlobLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetLinkResponse.AzureBlobLink").msgclass
|
|
32
|
+
GetLinkResponse::GcsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetLinkResponse.GcsLink").msgclass
|
|
33
|
+
UpdateLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.UpdateLinkRequest").msgclass
|
|
34
|
+
UpdateLinkRequest::CouchbaseLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.UpdateLinkRequest.CouchbaseLink").msgclass
|
|
35
|
+
UpdateLinkRequest::S3Link = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.UpdateLinkRequest.S3Link").msgclass
|
|
36
|
+
UpdateLinkRequest::AzureBlobLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.UpdateLinkRequest.AzureBlobLink").msgclass
|
|
37
|
+
UpdateLinkRequest::GcsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.UpdateLinkRequest.GcsLink").msgclass
|
|
38
|
+
UpdateLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.UpdateLinkResponse").msgclass
|
|
39
|
+
DeleteLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.DeleteLinkRequest").msgclass
|
|
40
|
+
DeleteLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.DeleteLinkResponse").msgclass
|
|
41
|
+
GetIngestionStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetIngestionStatusRequest").msgclass
|
|
42
|
+
GetIngestionStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetIngestionStatusResponse").msgclass
|
|
43
|
+
GetIngestionStatusResponse::Link = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link").msgclass
|
|
44
|
+
GetIngestionStatusResponse::Link::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link.State").msgclass
|
|
45
|
+
GetIngestionStatusResponse::Link::State::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link.State.Scope").msgclass
|
|
46
|
+
GetIngestionStatusResponse::Link::State::Scope::Collection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.GetIngestionStatusResponse.Link.State.Scope.Collection").msgclass
|
|
47
|
+
LinkStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.LinkStatus").enummodule
|
|
48
|
+
CouchbaseEncryptionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("couchbase.admin.analytics.v1.CouchbaseEncryptionMode").enummodule
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# Source: couchbase/admin/analytics/v1/analytics.proto for package 'Couchbase.Protostellar.Generated.Admin.Analytics.V1'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Analytics Admin Service
|
|
5
|
+
#
|
|
6
|
+
# Provides analytics link lifecycle management and ingestion status
|
|
7
|
+
# monitoring. Analytics links connect the analytics service to external
|
|
8
|
+
# data sources (remote Couchbase clusters, S3, Azure Blob, GCS).
|
|
9
|
+
|
|
10
|
+
require 'grpc'
|
|
11
|
+
require 'couchbase/protostellar/generated/admin/analytics/v1/analytics_pb'
|
|
12
|
+
|
|
13
|
+
module Couchbase
|
|
14
|
+
module Protostellar
|
|
15
|
+
module Generated
|
|
16
|
+
module Admin
|
|
17
|
+
module Analytics
|
|
18
|
+
module V1
|
|
19
|
+
module AnalyticsAdminService
|
|
20
|
+
# AnalyticsAdminService provides CRUD for analytics links and
|
|
21
|
+
# ingestion status monitoring.
|
|
22
|
+
class Service
|
|
23
|
+
|
|
24
|
+
include ::GRPC::GenericService
|
|
25
|
+
|
|
26
|
+
self.marshal_class_method = :encode
|
|
27
|
+
self.unmarshal_class_method = :decode
|
|
28
|
+
self.service_name = 'couchbase.admin.analytics.v1.AnalyticsAdminService'
|
|
29
|
+
|
|
30
|
+
# CreateLink creates a new analytics link.
|
|
31
|
+
rpc :CreateLink, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::CreateLinkRequest, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::CreateLinkResponse
|
|
32
|
+
# GetLink retrieves an analytics link's configuration.
|
|
33
|
+
# Sensitive fields (passwords, secret keys) are omitted from the response.
|
|
34
|
+
rpc :GetLink, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::GetLinkRequest, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::GetLinkResponse
|
|
35
|
+
# UpdateLink updates an existing analytics link's configuration.
|
|
36
|
+
rpc :UpdateLink, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::UpdateLinkRequest, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::UpdateLinkResponse
|
|
37
|
+
# DeleteLink removes an analytics link.
|
|
38
|
+
rpc :DeleteLink, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::DeleteLinkRequest, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::DeleteLinkResponse
|
|
39
|
+
# GetIngestionStatus returns the current ingestion status for all links,
|
|
40
|
+
# including progress, time lag, and scope/collection details.
|
|
41
|
+
rpc :GetIngestionStatus, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::GetIngestionStatusRequest, ::Couchbase::Protostellar::Generated::Admin::Analytics::V1::GetIngestionStatusResponse
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
Stub = Service.rpc_stub_class
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|