couchbase 3.2.0 → 3.2.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +24 -18
- package/binding.gyp +88 -85
- package/deps/lcb/CMakeLists.txt +1 -1
- package/deps/lcb/CONTRIBUTING.md +1 -1
- package/deps/lcb/README.markdown +2 -2
- package/deps/lcb/RELEASE_NOTES.markdown +99 -14
- package/deps/lcb/cmake/Modules/GetVersionInfo.cmake +1 -1
- package/deps/lcb/contrib/cbsasl/src/scram-sha/scram_utils.cc +22 -26
- package/deps/lcb/contrib/lcb-jsoncpp/lcb-jsoncpp.cpp +20 -7
- package/deps/lcb/doc/Doxyfile +1 -1
- package/deps/lcb/example/CMakeLists.txt +4 -4
- package/deps/lcb/example/libuvdirect/main.c +39 -12
- package/deps/lcb/example/minimal/durability.cc +149 -0
- package/deps/lcb/example/minimal/query.c +11 -9
- package/deps/lcb/gyp_config/common/libcouchbase/configuration.h +3 -3
- package/deps/lcb/gyp_config/linux/arm64/config.h +243 -0
- package/deps/lcb/include/libcouchbase/couchbase.h +80 -5
- package/deps/lcb/include/libcouchbase/error.h +2 -0
- package/deps/lcb/include/libcouchbase/ixmgmt.h +15 -10
- package/deps/lcb/include/libcouchbase/tracing.h +2 -2
- package/deps/lcb/include/memcached/protocol_binary.h +21 -0
- package/deps/lcb/libcouchbase.gyp +347 -349
- package/deps/lcb/packaging/deb/control +1 -1
- package/deps/lcb/src/analytics/analytics_handle.cc +13 -5
- package/deps/lcb/src/analytics/analytics_handle.hh +29 -0
- package/deps/lcb/src/bootstrap.cc +6 -3
- package/deps/lcb/src/capi/cmd_analytics.cc +12 -1
- package/deps/lcb/src/capi/cmd_analytics.hh +30 -0
- package/deps/lcb/src/capi/cmd_counter.hh +23 -0
- package/deps/lcb/src/capi/cmd_exists.hh +24 -1
- package/deps/lcb/src/capi/cmd_get.hh +22 -0
- package/deps/lcb/src/capi/cmd_get_replica.hh +23 -0
- package/deps/lcb/src/capi/cmd_http.hh +7 -0
- package/deps/lcb/src/capi/cmd_query.cc +11 -1
- package/deps/lcb/src/capi/cmd_query.hh +31 -0
- package/deps/lcb/src/capi/cmd_remove.hh +23 -0
- package/deps/lcb/src/capi/cmd_search.cc +6 -0
- package/deps/lcb/src/capi/cmd_search.hh +23 -0
- package/deps/lcb/src/capi/cmd_store.hh +33 -21
- package/deps/lcb/src/capi/cmd_subdoc.hh +35 -0
- package/deps/lcb/src/capi/cmd_touch.hh +23 -0
- package/deps/lcb/src/capi/cmd_unlock.hh +23 -0
- package/deps/lcb/src/capi/cmd_view.hh +6 -0
- package/deps/lcb/src/capi/collection_qualifier.hh +2 -2
- package/deps/lcb/src/cntl.cc +45 -11
- package/deps/lcb/src/crypto.cc +2 -2
- package/deps/lcb/src/dns-srv.cc +5 -3
- package/deps/lcb/src/errmap.cc +5 -9
- package/deps/lcb/src/errmap.h +7 -3
- package/deps/lcb/src/handler.cc +24 -18
- package/deps/lcb/src/hostlist.h +2 -2
- package/deps/lcb/src/http/http-priv.h +2 -2
- package/deps/lcb/src/http/http.cc +5 -2
- package/deps/lcb/src/instance.cc +20 -11
- package/deps/lcb/src/internal.h +9 -0
- package/deps/lcb/src/lcbio/connect.cc +14 -2
- package/deps/lcb/src/lcbio/connect.h +2 -2
- package/deps/lcb/src/lcbio/ctx.cc +4 -2
- package/deps/lcb/src/lcbio/ioutils.cc +9 -10
- package/deps/lcb/src/lcbio/manager.cc +1 -1
- package/deps/lcb/src/mcserver/mcserver.cc +9 -6
- package/deps/lcb/src/mcserver/negotiate.cc +39 -17
- package/deps/lcb/src/n1ql/ixmgmt.cc +1 -2
- package/deps/lcb/src/n1ql/query_handle.cc +41 -19
- package/deps/lcb/src/n1ql/query_handle.hh +28 -1
- package/deps/lcb/src/operations/counter.cc +18 -5
- package/deps/lcb/src/operations/exists.cc +25 -4
- package/deps/lcb/src/operations/get.cc +39 -19
- package/deps/lcb/src/operations/get_replica.cc +28 -8
- package/deps/lcb/src/operations/observe.cc +1 -1
- package/deps/lcb/src/operations/ping.cc +8 -8
- package/deps/lcb/src/operations/pktfwd.cc +2 -1
- package/deps/lcb/src/operations/remove.cc +39 -22
- package/deps/lcb/src/operations/store.cc +18 -5
- package/deps/lcb/src/operations/subdoc.cc +18 -6
- package/deps/lcb/src/operations/touch.cc +34 -16
- package/deps/lcb/src/operations/unlock.cc +24 -5
- package/deps/lcb/src/packetutils.h +3 -2
- package/deps/lcb/src/retryq.cc +24 -5
- package/deps/lcb/src/search/search.cc +1 -0
- package/deps/lcb/src/search/search_handle.cc +30 -8
- package/deps/lcb/src/search/search_handle.hh +29 -0
- package/deps/lcb/src/settings.cc +1 -1
- package/deps/lcb/src/ssl/ssl_common.c +6 -7
- package/deps/lcb/src/tracing/span.cc +47 -14
- package/deps/lcb/src/tracing/tracer.cc +11 -2
- package/deps/lcb/src/tracing/tracing-internal.h +105 -93
- package/deps/lcb/src/utilities.cc +43 -0
- package/deps/lcb/src/utilities.h +53 -0
- package/deps/lcb/src/vbucket/vbucket.c +34 -33
- package/deps/lcb/src/views/view_handle.cc +13 -5
- package/deps/lcb/src/views/view_handle.hh +29 -0
- package/deps/lcb/tests/CMakeLists.txt +21 -0
- package/deps/lcb/tests/basic/t_ctlcodes.cc +24 -3
- package/deps/lcb/tests/basic/t_jsparse.cc +8 -0
- package/deps/lcb/tests/basic/t_n1qlstrings.cc +73 -0
- package/deps/lcb/tests/iotests/mock-environment.cc +30 -1
- package/deps/lcb/tests/iotests/mock-environment.h +49 -0
- package/deps/lcb/tests/iotests/mock-unit-test.cc +104 -6
- package/deps/lcb/tests/iotests/mock-unit-test.h +34 -0
- package/deps/lcb/tests/iotests/t_collections.cc +1 -1
- package/deps/lcb/tests/iotests/t_confmon.cc +4 -2
- package/deps/lcb/tests/iotests/t_get.cc +109 -7
- package/deps/lcb/tests/iotests/t_http.cc +9 -4
- package/deps/lcb/tests/iotests/t_lock.cc +18 -0
- package/deps/lcb/tests/iotests/t_mutate.cc +157 -63
- package/deps/lcb/tests/iotests/t_n1ql.cc +330 -33
- package/deps/lcb/tests/iotests/t_views.cc +1 -0
- package/deps/lcb/tests/iotests/testutil.cc +168 -0
- package/deps/lcb/tests/iotests/testutil.h +116 -0
- package/deps/lcb/tests/mocksupport/procutil.c +32 -28
- package/deps/lcb/tests/mocksupport/server.c +0 -1
- package/deps/lcb/tests/mocksupport/timeout.c +2 -2
- package/deps/lcb/tools/cbc.cc +7 -0
- package/dist/analyticsindexmanager.js +512 -524
- package/dist/binding.d.ts +3 -0
- package/dist/bindingutilities.js +4 -0
- package/dist/bucket.js +1 -1
- package/dist/bucketmanager.d.ts +31 -1
- package/dist/bucketmanager.js +194 -186
- package/dist/cluster.d.ts +7 -0
- package/dist/cluster.js +48 -38
- package/dist/collection.js +11 -17
- package/dist/collectionmanager.js +181 -197
- package/dist/connection.d.ts +3 -1
- package/dist/connection.js +27 -16
- package/dist/couchbase.d.ts +1 -0
- package/dist/couchbase.js +3 -13
- package/dist/datastructures.js +239 -310
- package/dist/diagnosticsexecutor.js +70 -85
- package/dist/errors.d.ts +70 -0
- package/dist/errors.js +96 -2
- package/dist/eventingfunctionmanager.d.ts +804 -0
- package/dist/eventingfunctionmanager.js +993 -0
- package/dist/httpexecutor.d.ts +2 -1
- package/dist/httpexecutor.js +30 -37
- package/dist/queryindexmanager.js +240 -266
- package/dist/scope.js +10 -4
- package/dist/sdspecs.d.ts +1 -1
- package/dist/searchexecutor.js +3 -0
- package/dist/searchindexmanager.js +240 -271
- package/dist/searchquery.d.ts +17 -0
- package/dist/searchquery.js +22 -1
- package/dist/searchtypes.d.ts +7 -2
- package/dist/searchtypes.js +2 -2
- package/dist/usermanager.js +251 -264
- package/dist/utilities.d.ts +2 -0
- package/dist/utilities.js +7 -2
- package/dist/viewexecutor.js +1 -1
- package/dist/viewindexmanager.js +131 -150
- package/package.json +1 -1
- package/src/addondata.cpp +58 -0
- package/src/addondata.h +40 -0
- package/src/binding.cpp +3 -1
- package/src/cas.h +2 -2
- package/src/connection.cpp +25 -178
- package/src/connection.h +8 -65
- package/src/connection_ops.cpp +57 -34
- package/src/constants.cpp +3 -0
- package/src/instance.cpp +235 -0
- package/src/instance.h +102 -0
- package/src/{connection_callbacks.cpp → instance_callbacks.cpp} +34 -34
- package/src/logger.cpp +11 -1
- package/src/logger.h +3 -0
- package/src/metrics.cpp +10 -0
- package/src/metrics.h +3 -0
- package/src/mutationtoken.h +2 -2
- package/src/opbuilder.h +13 -15
- package/src/respreader.cpp +1 -0
- package/src/respreader.h +6 -4
- package/src/tracespan.h +11 -11
- package/src/tracing.cpp +11 -0
- package/src/tracing.h +3 -0
- package/src/valueparser.h +5 -0
- package/deps/lcb/example/observe/durability.c +0 -110
@@ -0,0 +1,804 @@
|
|
1
|
+
import { Cluster } from './cluster';
|
2
|
+
import { QueryScanConsistency } from './querytypes';
|
3
|
+
import { RequestSpan } from './tracing';
|
4
|
+
import { NodeCallback } from './utilities';
|
5
|
+
/**
|
6
|
+
* Represents the various dcp boundary options for eventing functions.
|
7
|
+
*
|
8
|
+
* @category Management
|
9
|
+
*/
|
10
|
+
export declare enum EventingFunctionDcpBoundary {
|
11
|
+
/**
|
12
|
+
* Indicates all documents should be processed by the function.
|
13
|
+
*/
|
14
|
+
Everything = "everything",
|
15
|
+
/**
|
16
|
+
* Indicates that only documents modified after a function is created
|
17
|
+
* should be processed by the function.
|
18
|
+
*/
|
19
|
+
FromNow = "from_now"
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* Represents the various possible deployment statuses for an eventing function.
|
23
|
+
*
|
24
|
+
* @category Management
|
25
|
+
*/
|
26
|
+
export declare enum EventingFunctionDeploymentStatus {
|
27
|
+
/**
|
28
|
+
* Indicates that the function is deployed.
|
29
|
+
*/
|
30
|
+
Deployed = "deployed",
|
31
|
+
/**
|
32
|
+
* Indicates that the function has not yet been deployed.
|
33
|
+
*/
|
34
|
+
Undeployed = "undeployed"
|
35
|
+
}
|
36
|
+
/**
|
37
|
+
* Represents the various possible processing statuses for an eventing function.
|
38
|
+
*
|
39
|
+
* @category Management
|
40
|
+
*/
|
41
|
+
export declare enum EventingFunctionProcessingStatus {
|
42
|
+
/**
|
43
|
+
* Indicates that the eventing function is currently running.
|
44
|
+
*/
|
45
|
+
Running = "running",
|
46
|
+
/**
|
47
|
+
* Indicates that the eventing function is currently paused.
|
48
|
+
*/
|
49
|
+
Paused = "paused"
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* Represents the authentication method to use for a URL binding.
|
53
|
+
*
|
54
|
+
* @category Management
|
55
|
+
*/
|
56
|
+
export declare enum EventingFunctionStatus {
|
57
|
+
/**
|
58
|
+
* Indicates that the eventing function is undeployed.
|
59
|
+
*/
|
60
|
+
Undeployed = "undeployed",
|
61
|
+
/**
|
62
|
+
* Indicates that the eventing function is deploying.
|
63
|
+
*/
|
64
|
+
Deploying = "deploying",
|
65
|
+
/**
|
66
|
+
* Indicates that the eventing function is deployed.
|
67
|
+
*/
|
68
|
+
Deployed = "deployed",
|
69
|
+
/**
|
70
|
+
* Indicates that the eventing function is undeploying.
|
71
|
+
*/
|
72
|
+
Undeploying = "undeploying",
|
73
|
+
/**
|
74
|
+
* Indicates that the eventing function is paused.
|
75
|
+
*/
|
76
|
+
Paused = "paused",
|
77
|
+
/**
|
78
|
+
* Indicates that the eventing function is pausing.
|
79
|
+
*/
|
80
|
+
Pausing = "pausing"
|
81
|
+
}
|
82
|
+
/**
|
83
|
+
* Represents the language compatibility levels of an eventing function.
|
84
|
+
*
|
85
|
+
* @category Management
|
86
|
+
*/
|
87
|
+
export declare enum EventingFunctionLanguageCompatibility {
|
88
|
+
/**
|
89
|
+
* Indicates that the function should run with compatibility with
|
90
|
+
* Couchbase Server 6.0.0.
|
91
|
+
*/
|
92
|
+
Version_6_0_0 = "6.0.0",
|
93
|
+
/**
|
94
|
+
* Indicates that the function should run with compatibility with
|
95
|
+
* Couchbase Server 6.5.0.
|
96
|
+
*/
|
97
|
+
Version_6_5_0 = "6.5.0",
|
98
|
+
/**
|
99
|
+
* Indicates that the function should run with compatibility with
|
100
|
+
* Couchbase Server 6.6.2.
|
101
|
+
*/
|
102
|
+
Version_6_6_2 = "6.6.2"
|
103
|
+
}
|
104
|
+
/**
|
105
|
+
* Represents the various log levels for an eventing function.
|
106
|
+
*
|
107
|
+
* @category Management
|
108
|
+
*/
|
109
|
+
export declare enum EventingFunctionLogLevel {
|
110
|
+
/**
|
111
|
+
* Indicates to use INFO level logging.
|
112
|
+
*/
|
113
|
+
Info = "INFO",
|
114
|
+
/**
|
115
|
+
* Indicates to use ERROR level logging.
|
116
|
+
*/
|
117
|
+
Error = "ERROR",
|
118
|
+
/**
|
119
|
+
* Indicates to use WARNING level logging.
|
120
|
+
*/
|
121
|
+
Warning = "WARNING",
|
122
|
+
/**
|
123
|
+
* Indicates to use DEBUG level logging.
|
124
|
+
*/
|
125
|
+
Debug = "DEBUG",
|
126
|
+
/**
|
127
|
+
* Indicates to use TRACE level logging.
|
128
|
+
*/
|
129
|
+
Trace = "TRACE"
|
130
|
+
}
|
131
|
+
/**
|
132
|
+
* Represents the various bucket access levels for an eventing function.
|
133
|
+
*
|
134
|
+
* @category Management
|
135
|
+
*/
|
136
|
+
export declare enum EventingFunctionBucketAccess {
|
137
|
+
/**
|
138
|
+
* Indicates that the function can only read the associated bucket.
|
139
|
+
*/
|
140
|
+
ReadOnly = "r",
|
141
|
+
/**
|
142
|
+
* Indicates that the function can both read and write the associated bucket.
|
143
|
+
*/
|
144
|
+
ReadWrite = "rw"
|
145
|
+
}
|
146
|
+
/**
|
147
|
+
* Represents the authentication method to use for a URL binding.
|
148
|
+
*
|
149
|
+
* @category Management
|
150
|
+
*/
|
151
|
+
export declare enum EventingFunctionUrlAuthMethod {
|
152
|
+
/**
|
153
|
+
* Indicates that no authentication should be used.
|
154
|
+
*/
|
155
|
+
None = "no-auth",
|
156
|
+
/**
|
157
|
+
* Indicates that Basic should be used.
|
158
|
+
*/
|
159
|
+
Basic = "basic",
|
160
|
+
/**
|
161
|
+
* Indicates that Digest should be used.
|
162
|
+
*/
|
163
|
+
Digest = "digest",
|
164
|
+
/**
|
165
|
+
* Indicates that Bearer should be used.
|
166
|
+
*/
|
167
|
+
Bearer = "bearer"
|
168
|
+
}
|
169
|
+
/**
|
170
|
+
* Specifies the bucket/scope/collection used by an eventing function.
|
171
|
+
*
|
172
|
+
* @category Management
|
173
|
+
*/
|
174
|
+
export declare class EventingFunctionKeyspace {
|
175
|
+
constructor(v: EventingFunctionKeyspace);
|
176
|
+
/**
|
177
|
+
* The bucket to use.
|
178
|
+
*/
|
179
|
+
bucket: string;
|
180
|
+
/**
|
181
|
+
* The scope to use.
|
182
|
+
*/
|
183
|
+
scope?: string;
|
184
|
+
/**
|
185
|
+
* The collection to use.
|
186
|
+
*/
|
187
|
+
collection?: string;
|
188
|
+
}
|
189
|
+
/**
|
190
|
+
* Specifies a bucket binding for an eventing function.
|
191
|
+
*
|
192
|
+
* @category Management
|
193
|
+
*/
|
194
|
+
export declare class EventingFunctionBucketBinding {
|
195
|
+
constructor(v: EventingFunctionBucketBinding);
|
196
|
+
/**
|
197
|
+
* The alias to use for referring to this binding.
|
198
|
+
*/
|
199
|
+
alias: string;
|
200
|
+
/**
|
201
|
+
* The keyspace that this binding refers to.
|
202
|
+
*/
|
203
|
+
name: EventingFunctionKeyspace;
|
204
|
+
/**
|
205
|
+
* The level of access configured for this binding.
|
206
|
+
*/
|
207
|
+
access: EventingFunctionBucketAccess;
|
208
|
+
/**
|
209
|
+
* @internal
|
210
|
+
*/
|
211
|
+
static _fromEvtData(data: any): EventingFunctionBucketBinding;
|
212
|
+
/**
|
213
|
+
* @internal
|
214
|
+
*/
|
215
|
+
static _toEvtData(data: EventingFunctionBucketBinding): any;
|
216
|
+
}
|
217
|
+
/**
|
218
|
+
* Specifies a type of url authentication to use.
|
219
|
+
*
|
220
|
+
* @category Management
|
221
|
+
*/
|
222
|
+
export interface EventingFunctionUrlAuth {
|
223
|
+
/**
|
224
|
+
* The method of authentication to use.
|
225
|
+
*/
|
226
|
+
method: EventingFunctionUrlAuthMethod;
|
227
|
+
}
|
228
|
+
/**
|
229
|
+
* Specifies that Basic authentication should be used for the URL.
|
230
|
+
*
|
231
|
+
* @category Management
|
232
|
+
*/
|
233
|
+
export declare class EventingFunctionUrlAuthBasic implements EventingFunctionUrlAuth {
|
234
|
+
/**
|
235
|
+
* Sets the auth method to Basic.
|
236
|
+
*/
|
237
|
+
method: EventingFunctionUrlAuthMethod;
|
238
|
+
constructor(v: Omit<EventingFunctionUrlAuthBasic, 'method'>);
|
239
|
+
/**
|
240
|
+
* Specifies the username to use for authentication.
|
241
|
+
*/
|
242
|
+
username: string;
|
243
|
+
/**
|
244
|
+
* Specifies the password to use for authentication.
|
245
|
+
*/
|
246
|
+
password: string;
|
247
|
+
}
|
248
|
+
/**
|
249
|
+
* Specifies that Digest authentication should be used for the URL.
|
250
|
+
*
|
251
|
+
* @category Management
|
252
|
+
*/
|
253
|
+
export declare class EventingFunctionUrlAuthDigest implements EventingFunctionUrlAuth {
|
254
|
+
/**
|
255
|
+
* Sets the auth method to Digest.
|
256
|
+
*/
|
257
|
+
method: EventingFunctionUrlAuthMethod;
|
258
|
+
constructor(v: Omit<EventingFunctionUrlAuthDigest, 'method'>);
|
259
|
+
/**
|
260
|
+
* Specifies the username to use for authentication.
|
261
|
+
*/
|
262
|
+
username: string;
|
263
|
+
/**
|
264
|
+
* Specifies the password to use for authentication.
|
265
|
+
*/
|
266
|
+
password: string;
|
267
|
+
}
|
268
|
+
/**
|
269
|
+
* Specifies that Bearer authentication should be used for the URL.
|
270
|
+
*
|
271
|
+
* @category Management
|
272
|
+
*/
|
273
|
+
export declare class EventingFunctionUrlAuthBearer implements EventingFunctionUrlAuth {
|
274
|
+
/**
|
275
|
+
* Sets the auth method to Bearer.
|
276
|
+
*/
|
277
|
+
method: EventingFunctionUrlAuthMethod;
|
278
|
+
constructor(v: Omit<EventingFunctionUrlAuthBearer, 'method'>);
|
279
|
+
/**
|
280
|
+
* Specifies the bearer token to use.
|
281
|
+
*/
|
282
|
+
key: string;
|
283
|
+
}
|
284
|
+
/**
|
285
|
+
* Specifies a url binding for an eventing function.
|
286
|
+
*
|
287
|
+
* @category Management
|
288
|
+
*/
|
289
|
+
export declare class EventingFunctionUrlBinding {
|
290
|
+
constructor(v: EventingFunctionUrlBinding);
|
291
|
+
/**
|
292
|
+
* The alias to use for referring to this binding.
|
293
|
+
*/
|
294
|
+
alias: string;
|
295
|
+
/**
|
296
|
+
* The hostname this url binding should refer to.
|
297
|
+
*/
|
298
|
+
hostname: string;
|
299
|
+
/**
|
300
|
+
* The authentication that should be used.
|
301
|
+
*/
|
302
|
+
auth?: EventingFunctionUrlAuth;
|
303
|
+
/**
|
304
|
+
* Whether or not cookies should be allowed.
|
305
|
+
*/
|
306
|
+
allowCookies: boolean;
|
307
|
+
/**
|
308
|
+
* Whether the SSL certificate should be validated.
|
309
|
+
*/
|
310
|
+
validateSslCertificate: boolean;
|
311
|
+
/**
|
312
|
+
* @internal
|
313
|
+
*/
|
314
|
+
static _fromEvtData(data: any): EventingFunctionUrlBinding;
|
315
|
+
/**
|
316
|
+
* @internal
|
317
|
+
*/
|
318
|
+
static _toEvtData(data: EventingFunctionUrlBinding): any;
|
319
|
+
}
|
320
|
+
/**
|
321
|
+
* Specifies a constant binding for an eventing function.
|
322
|
+
*
|
323
|
+
* @category Management
|
324
|
+
*/
|
325
|
+
export declare class EventingFunctionConstantBinding {
|
326
|
+
constructor(v: EventingFunctionConstantBinding);
|
327
|
+
/**
|
328
|
+
* The alias to use for referring to this binding.
|
329
|
+
*/
|
330
|
+
alias: string;
|
331
|
+
/**
|
332
|
+
* The literal value for this binding.
|
333
|
+
*/
|
334
|
+
literal: string;
|
335
|
+
/**
|
336
|
+
* @internal
|
337
|
+
*/
|
338
|
+
static _fromEvtData(data: any): EventingFunctionConstantBinding;
|
339
|
+
/**
|
340
|
+
* @internal
|
341
|
+
*/
|
342
|
+
static _toEvtData(data: EventingFunctionConstantBinding): any;
|
343
|
+
}
|
344
|
+
/**
|
345
|
+
* Specifies a number of options which can be used when updating or creating
|
346
|
+
* a eventing function.
|
347
|
+
*
|
348
|
+
* @category Management
|
349
|
+
*/
|
350
|
+
export declare class EventingFunctionSettings {
|
351
|
+
constructor(v: EventingFunctionSettings);
|
352
|
+
/**
|
353
|
+
* The number of worker threads to use for the function.
|
354
|
+
*/
|
355
|
+
cppWorkerThreadCount: number;
|
356
|
+
/**
|
357
|
+
* The DCP stream boundary to use.
|
358
|
+
*/
|
359
|
+
dcpStreamBoundary: EventingFunctionDcpBoundary;
|
360
|
+
/**
|
361
|
+
* A description of this eventing function.
|
362
|
+
*/
|
363
|
+
description: string;
|
364
|
+
/**
|
365
|
+
* The current deployment status of the function.
|
366
|
+
*/
|
367
|
+
deploymentStatus: EventingFunctionDeploymentStatus;
|
368
|
+
/**
|
369
|
+
* The current processing status of the function.
|
370
|
+
*/
|
371
|
+
processingStatus: EventingFunctionProcessingStatus;
|
372
|
+
/**
|
373
|
+
* The active compatibility mode for the function.
|
374
|
+
*/
|
375
|
+
languageCompatibility: EventingFunctionLanguageCompatibility;
|
376
|
+
/**
|
377
|
+
* The level of logging that should be captured for the function.
|
378
|
+
*/
|
379
|
+
logLevel: EventingFunctionLogLevel;
|
380
|
+
/**
|
381
|
+
* The maximum period of time the function can execute on a document
|
382
|
+
* before timing out.
|
383
|
+
*/
|
384
|
+
executionTimeout: number;
|
385
|
+
/**
|
386
|
+
* The maximum number of internal clients that the function should
|
387
|
+
* maintain for KV operations.
|
388
|
+
*/
|
389
|
+
lcbInstCapacity: number;
|
390
|
+
/**
|
391
|
+
* The maximum number of times to retry a KV operation before failing
|
392
|
+
* the function.
|
393
|
+
*/
|
394
|
+
lcbRetryCount: number;
|
395
|
+
/**
|
396
|
+
* The maximum period of time a KV operation within the function can
|
397
|
+
* operate before timing out.
|
398
|
+
*/
|
399
|
+
lcbTimeout: number;
|
400
|
+
/**
|
401
|
+
* The level of consistency to use when performing queries in the function.
|
402
|
+
*/
|
403
|
+
queryConsistency: QueryScanConsistency;
|
404
|
+
/**
|
405
|
+
* The number of partitions that should be used for timer tracking.
|
406
|
+
*/
|
407
|
+
numTimerPartitions: number;
|
408
|
+
/**
|
409
|
+
* The batch size for messages from producer to consumer.
|
410
|
+
*/
|
411
|
+
sockBatchSize: number;
|
412
|
+
/**
|
413
|
+
* The duration to log stats from this handler, in milliseconds.
|
414
|
+
*/
|
415
|
+
tickDuration: number;
|
416
|
+
/**
|
417
|
+
* The size limit of timer context object.
|
418
|
+
*/
|
419
|
+
timerContextSize: number;
|
420
|
+
/**
|
421
|
+
* The key prefix for all data stored in metadata by this handler.
|
422
|
+
*/
|
423
|
+
userPrefix: string;
|
424
|
+
/**
|
425
|
+
* The maximum size in bytes the bucket cache can grow to.
|
426
|
+
*/
|
427
|
+
bucketCacheSize: number;
|
428
|
+
/**
|
429
|
+
* The time in milliseconds after which a cached bucket object is considered stale.
|
430
|
+
*/
|
431
|
+
bucketCacheAge: number;
|
432
|
+
/**
|
433
|
+
* The maximum allowable curl call response in 'MegaBytes'. Setting the value to 0
|
434
|
+
* lifts the upper limit off. This parameters affects v8 engine stability since it
|
435
|
+
* defines the maximum amount of heap space acquired by a curl call.
|
436
|
+
*/
|
437
|
+
curlMaxAllowedRespSize: number;
|
438
|
+
/**
|
439
|
+
* Whether to automatically prepare all query statements in the handler.
|
440
|
+
*/
|
441
|
+
queryPrepareAll: boolean;
|
442
|
+
/**
|
443
|
+
* The number of worker processes handler utilizes on each eventing node.
|
444
|
+
*/
|
445
|
+
workerCount: number;
|
446
|
+
/**
|
447
|
+
* The code to automatically prepend to top of handler code.
|
448
|
+
*/
|
449
|
+
handlerHeaders: string[];
|
450
|
+
/**
|
451
|
+
* The code to automatically append to bottom of handler code.
|
452
|
+
*/
|
453
|
+
handlerFooters: string[];
|
454
|
+
/**
|
455
|
+
* Whether to enable rotating this handlers log() message files.
|
456
|
+
*/
|
457
|
+
enableAppLogRotation: boolean;
|
458
|
+
/**
|
459
|
+
* The directory to write content of log() message files.
|
460
|
+
*/
|
461
|
+
appLogDir: string;
|
462
|
+
/**
|
463
|
+
* The size in bytes of the log file when the file should be rotated.
|
464
|
+
*/
|
465
|
+
appLogMaxSize: number;
|
466
|
+
/**
|
467
|
+
* The number of log() message files to retain when rotating.
|
468
|
+
*/
|
469
|
+
appLogMaxFiles: number;
|
470
|
+
/**
|
471
|
+
* The number of seconds before writing a progress checkpoint.
|
472
|
+
*/
|
473
|
+
checkpointInterval: number;
|
474
|
+
/**
|
475
|
+
* @internal
|
476
|
+
*/
|
477
|
+
static _fromEvtData(data: any): EventingFunctionSettings;
|
478
|
+
/**
|
479
|
+
* @internal
|
480
|
+
*/
|
481
|
+
static _toEvtData(data: EventingFunctionSettings): any;
|
482
|
+
}
|
483
|
+
/**
|
484
|
+
* Describes an eventing function.
|
485
|
+
*
|
486
|
+
* @category Management
|
487
|
+
*/
|
488
|
+
export declare class EventingFunction {
|
489
|
+
constructor(v: EventingFunction);
|
490
|
+
/**
|
491
|
+
* The name of the eventing function.
|
492
|
+
*/
|
493
|
+
name: string;
|
494
|
+
/**
|
495
|
+
* The code for this eventing function.
|
496
|
+
*/
|
497
|
+
code: string;
|
498
|
+
/**
|
499
|
+
* The authoring version of this eventing function.
|
500
|
+
*/
|
501
|
+
version: string;
|
502
|
+
/**
|
503
|
+
* Whether to enable stricter validation of settings and configuration.
|
504
|
+
*/
|
505
|
+
enforceSchema: boolean;
|
506
|
+
/**
|
507
|
+
* The unique ID for this eventing function.
|
508
|
+
*/
|
509
|
+
handlerUuid: number;
|
510
|
+
/**
|
511
|
+
* The unique id for the deployment of the handler.
|
512
|
+
*/
|
513
|
+
functionInstanceId: string;
|
514
|
+
/**
|
515
|
+
* The keyspace to store the functions metadata.
|
516
|
+
*/
|
517
|
+
metadataKeyspace: EventingFunctionKeyspace;
|
518
|
+
/**
|
519
|
+
* The keyspace that the function should operate on.
|
520
|
+
*/
|
521
|
+
sourceKeyspace: EventingFunctionKeyspace;
|
522
|
+
/**
|
523
|
+
* The buckets to bind to the function.
|
524
|
+
*/
|
525
|
+
bucketBindings: EventingFunctionBucketBinding[];
|
526
|
+
/**
|
527
|
+
* The URLs to bind to the function.
|
528
|
+
*/
|
529
|
+
urlBindings: EventingFunctionUrlBinding[];
|
530
|
+
/**
|
531
|
+
* The constants to bind to the function.
|
532
|
+
*/
|
533
|
+
constantBindings: EventingFunctionConstantBinding[];
|
534
|
+
/**
|
535
|
+
* The settings for this function.
|
536
|
+
*/
|
537
|
+
settings: EventingFunctionSettings;
|
538
|
+
/**
|
539
|
+
* @internal
|
540
|
+
*/
|
541
|
+
static _fromEvtData(data: any): EventingFunction;
|
542
|
+
/**
|
543
|
+
* @internal
|
544
|
+
*/
|
545
|
+
static _toEvtData(data: EventingFunction): any;
|
546
|
+
}
|
547
|
+
/**
|
548
|
+
* Describes the current state of an eventing function.
|
549
|
+
*
|
550
|
+
* @category Management
|
551
|
+
*/
|
552
|
+
export declare class EventingFunctionState {
|
553
|
+
constructor(v: EventingFunctionState);
|
554
|
+
/**
|
555
|
+
* The name of the eventing function.
|
556
|
+
*/
|
557
|
+
name: string;
|
558
|
+
/**
|
559
|
+
* The current overall state of this eventing function.
|
560
|
+
*/
|
561
|
+
status: EventingFunctionStatus;
|
562
|
+
/**
|
563
|
+
* The number of nodes where this eventing function is bootstrapping.
|
564
|
+
*/
|
565
|
+
numBootstrappingNodes: number;
|
566
|
+
/**
|
567
|
+
* The number of nodes where this eventing function is deployed.
|
568
|
+
*/
|
569
|
+
numDeployedNodes: number;
|
570
|
+
/**
|
571
|
+
* The current deployment status of this eventing function.
|
572
|
+
*/
|
573
|
+
deploymentStatus: EventingFunctionDeploymentStatus;
|
574
|
+
/**
|
575
|
+
* The current processing status of this eventing function.
|
576
|
+
*/
|
577
|
+
processingStatus: EventingFunctionProcessingStatus;
|
578
|
+
/**
|
579
|
+
* @internal
|
580
|
+
*/
|
581
|
+
static _fromEvtData(data: any): EventingFunctionState;
|
582
|
+
}
|
583
|
+
/**
|
584
|
+
* Describes the current state of all eventing function.
|
585
|
+
*
|
586
|
+
* @category Management
|
587
|
+
*/
|
588
|
+
export declare class EventingState {
|
589
|
+
constructor(v: EventingState);
|
590
|
+
/**
|
591
|
+
* The number of eventing nodes that are currently active.
|
592
|
+
*/
|
593
|
+
numEventingNodes: number;
|
594
|
+
/**
|
595
|
+
* The states of all registered eventing functions.
|
596
|
+
*/
|
597
|
+
functions: EventingFunctionState[];
|
598
|
+
/**
|
599
|
+
* @internal
|
600
|
+
*/
|
601
|
+
static _fromEvtData(data: any): EventingState;
|
602
|
+
}
|
603
|
+
/**
|
604
|
+
* @category Management
|
605
|
+
*/
|
606
|
+
export interface UpsertFunctionOptions {
|
607
|
+
/**
|
608
|
+
* The parent tracing span that this operation will be part of.
|
609
|
+
*/
|
610
|
+
parentSpan?: RequestSpan;
|
611
|
+
/**
|
612
|
+
* The timeout for this operation, represented in milliseconds.
|
613
|
+
*/
|
614
|
+
timeout?: number;
|
615
|
+
}
|
616
|
+
/**
|
617
|
+
* @category Management
|
618
|
+
*/
|
619
|
+
export interface DropFunctionOptions {
|
620
|
+
/**
|
621
|
+
* The parent tracing span that this operation will be part of.
|
622
|
+
*/
|
623
|
+
parentSpan?: RequestSpan;
|
624
|
+
/**
|
625
|
+
* The timeout for this operation, represented in milliseconds.
|
626
|
+
*/
|
627
|
+
timeout?: number;
|
628
|
+
}
|
629
|
+
/**
|
630
|
+
* @category Management
|
631
|
+
*/
|
632
|
+
export interface GetAllFunctionsOptions {
|
633
|
+
/**
|
634
|
+
* The parent tracing span that this operation will be part of.
|
635
|
+
*/
|
636
|
+
parentSpan?: RequestSpan;
|
637
|
+
/**
|
638
|
+
* The timeout for this operation, represented in milliseconds.
|
639
|
+
*/
|
640
|
+
timeout?: number;
|
641
|
+
}
|
642
|
+
/**
|
643
|
+
* @category Management
|
644
|
+
*/
|
645
|
+
export interface GetFunctionOptions {
|
646
|
+
/**
|
647
|
+
* The parent tracing span that this operation will be part of.
|
648
|
+
*/
|
649
|
+
parentSpan?: RequestSpan;
|
650
|
+
/**
|
651
|
+
* The timeout for this operation, represented in milliseconds.
|
652
|
+
*/
|
653
|
+
timeout?: number;
|
654
|
+
}
|
655
|
+
/**
|
656
|
+
* @category Management
|
657
|
+
*/
|
658
|
+
export interface DeployFunctionOptions {
|
659
|
+
/**
|
660
|
+
* The parent tracing span that this operation will be part of.
|
661
|
+
*/
|
662
|
+
parentSpan?: RequestSpan;
|
663
|
+
/**
|
664
|
+
* The timeout for this operation, represented in milliseconds.
|
665
|
+
*/
|
666
|
+
timeout?: number;
|
667
|
+
}
|
668
|
+
/**
|
669
|
+
* @category Management
|
670
|
+
*/
|
671
|
+
export interface UndeployFunctionOptions {
|
672
|
+
/**
|
673
|
+
* The parent tracing span that this operation will be part of.
|
674
|
+
*/
|
675
|
+
parentSpan?: RequestSpan;
|
676
|
+
/**
|
677
|
+
* The timeout for this operation, represented in milliseconds.
|
678
|
+
*/
|
679
|
+
timeout?: number;
|
680
|
+
}
|
681
|
+
/**
|
682
|
+
* @category Management
|
683
|
+
*/
|
684
|
+
export interface PauseFunctionOptions {
|
685
|
+
/**
|
686
|
+
* The parent tracing span that this operation will be part of.
|
687
|
+
*/
|
688
|
+
parentSpan?: RequestSpan;
|
689
|
+
/**
|
690
|
+
* The timeout for this operation, represented in milliseconds.
|
691
|
+
*/
|
692
|
+
timeout?: number;
|
693
|
+
}
|
694
|
+
/**
|
695
|
+
* @category Management
|
696
|
+
*/
|
697
|
+
export interface ResumeFunctionOptions {
|
698
|
+
/**
|
699
|
+
* The parent tracing span that this operation will be part of.
|
700
|
+
*/
|
701
|
+
parentSpan?: RequestSpan;
|
702
|
+
/**
|
703
|
+
* The timeout for this operation, represented in milliseconds.
|
704
|
+
*/
|
705
|
+
timeout?: number;
|
706
|
+
}
|
707
|
+
/**
|
708
|
+
* @category Management
|
709
|
+
*/
|
710
|
+
export interface FunctionsStatusOptions {
|
711
|
+
/**
|
712
|
+
* The parent tracing span that this operation will be part of.
|
713
|
+
*/
|
714
|
+
parentSpan?: RequestSpan;
|
715
|
+
/**
|
716
|
+
* The timeout for this operation, represented in milliseconds.
|
717
|
+
*/
|
718
|
+
timeout?: number;
|
719
|
+
}
|
720
|
+
/**
|
721
|
+
* EventingFunctionManager provides an interface for managing the
|
722
|
+
* eventing functions on the cluster.
|
723
|
+
* Volatile: This API is subject to change at any time.
|
724
|
+
*
|
725
|
+
* @category Management
|
726
|
+
*/
|
727
|
+
export declare class EventingFunctionManager {
|
728
|
+
private _cluster;
|
729
|
+
/**
|
730
|
+
* @internal
|
731
|
+
*/
|
732
|
+
constructor(cluster: Cluster);
|
733
|
+
private get _http();
|
734
|
+
/**
|
735
|
+
* Creates or updates an eventing function.
|
736
|
+
*
|
737
|
+
* @param functionDefinition The description of the eventing function to upsert.
|
738
|
+
* @param options Optional parameters for this operation.
|
739
|
+
* @param callback A node-style callback to be invoked after execution.
|
740
|
+
*/
|
741
|
+
upsertFunction(functionDefinition: EventingFunction, options?: UpsertFunctionOptions, callback?: NodeCallback<void>): Promise<void>;
|
742
|
+
/**
|
743
|
+
* Deletes an eventing function.
|
744
|
+
*
|
745
|
+
* @param name The name of the eventing function to delete.
|
746
|
+
* @param options Optional parameters for this operation.
|
747
|
+
* @param callback A node-style callback to be invoked after execution.
|
748
|
+
*/
|
749
|
+
dropFunction(name: string, options?: DropFunctionOptions, callback?: NodeCallback<void>): Promise<void>;
|
750
|
+
/**
|
751
|
+
* Fetches all eventing functions.
|
752
|
+
*
|
753
|
+
* @param options Optional parameters for this operation.
|
754
|
+
* @param callback A node-style callback to be invoked after execution.
|
755
|
+
*/
|
756
|
+
getAllFunctions(options?: GetAllFunctionsOptions, callback?: NodeCallback<EventingFunction[]>): Promise<EventingFunction[]>;
|
757
|
+
/**
|
758
|
+
* Fetches a specific eventing function.
|
759
|
+
*
|
760
|
+
* @param name The name of the eventing function to fetch.
|
761
|
+
* @param options Optional parameters for this operation.
|
762
|
+
* @param callback A node-style callback to be invoked after execution.
|
763
|
+
*/
|
764
|
+
getFunction(name: string, options?: GetFunctionOptions, callback?: NodeCallback<EventingFunction>): Promise<EventingFunction>;
|
765
|
+
/**
|
766
|
+
* Deploys an eventing function.
|
767
|
+
*
|
768
|
+
* @param name The name of the eventing function to deploy.
|
769
|
+
* @param options Optional parameters for this operation.
|
770
|
+
* @param callback A node-style callback to be invoked after execution.
|
771
|
+
*/
|
772
|
+
deployFunction(name: string, options?: DeployFunctionOptions, callback?: NodeCallback<void>): Promise<void>;
|
773
|
+
/**
|
774
|
+
* Undeploys an eventing function.
|
775
|
+
*
|
776
|
+
* @param name The name of the eventing function to undeploy.
|
777
|
+
* @param options Optional parameters for this operation.
|
778
|
+
* @param callback A node-style callback to be invoked after execution.
|
779
|
+
*/
|
780
|
+
undeployFunction(name: string, options?: DeployFunctionOptions, callback?: NodeCallback<void>): Promise<void>;
|
781
|
+
/**
|
782
|
+
* Pauses an eventing function.
|
783
|
+
*
|
784
|
+
* @param name The name of the eventing function to pause.
|
785
|
+
* @param options Optional parameters for this operation.
|
786
|
+
* @param callback A node-style callback to be invoked after execution.
|
787
|
+
*/
|
788
|
+
pauseFunction(name: string, options?: PauseFunctionOptions, callback?: NodeCallback<void>): Promise<void>;
|
789
|
+
/**
|
790
|
+
* Resumes an eventing function.
|
791
|
+
*
|
792
|
+
* @param name The name of the eventing function to resume.
|
793
|
+
* @param options Optional parameters for this operation.
|
794
|
+
* @param callback A node-style callback to be invoked after execution.
|
795
|
+
*/
|
796
|
+
resumeFunction(name: string, options?: ResumeFunctionOptions, callback?: NodeCallback<void>): Promise<void>;
|
797
|
+
/**
|
798
|
+
* Fetches the status of all eventing functions.
|
799
|
+
*
|
800
|
+
* @param options Optional parameters for this operation.
|
801
|
+
* @param callback A node-style callback to be invoked after execution.
|
802
|
+
*/
|
803
|
+
functionsStatus(options?: FunctionsStatusOptions, callback?: NodeCallback<EventingState>): Promise<EventingState>;
|
804
|
+
}
|