Couchbase C Client  3.2.0
Asynchronous C Client for Couchbase
cntl.h
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /*
3  * Copyright 2017-2020 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 
29 #ifndef LCB_CNTL_H
30 #define LCB_CNTL_H
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
122 #define LCB_CNTL_SET 0x01
123 #define LCB_CNTL_GET 0x00
147 #define LCB_CNTL_OP_TIMEOUT 0x00
148 
156 #define LCB_CNTL_VIEW_TIMEOUT 0x01
157 
165 #define LCB_CNTL_QUERY_TIMEOUT 0x3D
175 #define LCB_CNTL_BUCKETNAME 0x30
176 
190 #define LCB_CNTL_BUCKETTYPE 0x48
191 
199 #define LCB_CNTL_HANDLETYPE 0x04
200 
206 #define LCB_CNTL_VBCONFIG 0x05
207 
213 #define LCB_CNTL_IOPS 0x06
216 typedef struct lcb_cntl_vbinfo_st {
217  int version;
218 
219  union {
221  struct {
222  const void *key;
223  lcb_SIZE nkey;
224  int vbucket;
225  int server_index;
226  } v0;
227  } v;
229 
236 #define LCB_CNTL_VBMAP 0x07
237 
241 typedef enum {
242  LCB_IPV6_DISABLED = 0x00,
243  LCB_IPV6_ONLY = 0x1,
244  LCB_IPV6_ALLOW = 0x02
245 } lcb_ipv6_t;
246 
257 #define LCB_CNTL_IP6POLICY 0x0b
268 #define LCB_CNTL_CONFERRTHRESH 0x0c
269 
281 #define LCB_CNTL_DURABILITY_TIMEOUT 0x0d
282 
292 #define LCB_CNTL_DURABILITY_INTERVAL 0x0e
293 
303 #define LCB_CNTL_HTTP_TIMEOUT 0x0f
320 #define LCB_CNTL_IOPS_DLOPEN_DEBUG 0x11
321 
327 #define LCB_CNTL_CONFIGURATION_TIMEOUT 0x12
328 
342 #define LCB_CNTL_RANDOMIZE_BOOTSTRAP_HOSTS 0x14
343 
359 #define LCB_CNTL_CONFIG_CACHE_LOADED 0x15
360 
376 #define LCB_CNTL_FORCE_SASL_MECH 0x16
377 
386 #define LCB_CNTL_MAX_REDIRECTS 0x17
387 
410 #define LCB_CNTL_LOGGER 0x18
411 
428 #define LCB_CNTL_CONFDELAY_THRESH 0x19
429 
435 #define LCB_CNTL_CONFIG_TRANSPORT 0x1A
436 
456 #define LCB_CNTL_CONFIG_NODE_TIMEOUT 0x1B
457 
479 #define LCB_CNTL_HTCONFIG_IDLE_TIMEOUT 0x1C
480 
485 #define LCB_CNTL_CHANGESET 0x1F
486 
506 #define LCB_CNTL_CONFIGCACHE 0x21
507 
517 #define LCB_CNTL_CONFIGCACHE_RO 0x36
518 
524 typedef enum {
525  LCB_SSL_ENABLED = 1 << 0,
526  LCB_SSL_NOVERIFY = 1 << 1,
527  LCB_SSL_NOGLOBALINIT = 1 << 2
528 } lcb_SSLOPTS;
529 
540 #define LCB_CNTL_SSL_MODE 0x22
541 
551 #define LCB_CNTL_SSL_CERT 0x23
552 
565 #define LCB_CNTL_SSL_KEY 0x4b
566 
577 #define LCB_CNTL_SSL_TRUSTSTORE 0x4d
578 
583 #define LCB_CNTL_SSL_CACERT LCB_CNTL_SSL_CERT
584 
588 typedef enum {
598 
599 typedef enum {
604 
608  LCB_RETRY_CMDS_GET = 0x01,
609 
613  LCB_RETRY_CMDS_SAFE = 0x03, /* Includes 'GET', plus a new flag (e.g. 0x02|0x01) */
614 
617  LCB_RETRY_CMDS_ALL = 0x07 /* e.g. 0x01|0x03| NEW FLAG: 0x04 */
619 
627 #define LCB_RETRYOPT_CREATE(mode, policy) (((mode) << 16) | policy)
628 
630 #define LCB_RETRYOPT_GETMODE(u) ((u) >> 16)
631 
632 #define LCB_RETRYOPT_GETPOLICY(u) ((u)&0xffff)
633 
674 #define LCB_CNTL_RETRYMODE 0x24
675 
679 typedef enum {
682 
685 
689 
709 #define LCB_CNTL_HTCONFIG_URLTYPE 0x25
710 
721 #define LCB_CNTL_SYNCDESTROY 0x28
722 
739 #define LCB_CNTL_CONLOGGER_LEVEL 0x29
758 #define LCB_CNTL_CONLOGGER_FP 0x3B
759 
772 #define LCB_CNTL_DETAILED_ERRCODES 0x2A
773 
787 #define LCB_CNTL_RETRY_INTERVAL 0x2C
788 
802 #define LCB_CNTL_RETRY_NMV_IMM 0x37
803 
812 #define LCB_CNTL_HTTP_POOLSIZE 0x2E
813 
824 #define LCB_CNTL_HTTP_REFRESH_CONFIG_ON_ERROR 0x2F
825 
835 #define LCB_CNTL_SCHED_IMPLICIT_FLUSH 0x31
849 #define LCB_CNTL_ENABLE_MUTATION_TOKENS 0x34
850 
860 #define LCB_CNTL_MUTATION_TOKENS_SUPPORTED 0x38
861 
875 #define LCB_CNTL_RESET_TIMEOUT_ON_WAIT 0x3A
876 
883 #define LCB_CNTL_QUERY_CLEARACHE 0x3E
884 
894 #define LCB_CNTL_CLIENT_STRING 0x3F
895 
896 typedef const char *lcb_BUCKETCRED[2];
897 
906 #define LCB_CNTL_BUCKET_CRED 0x40
907 
917 #define LCB_CNTL_RETRY_NMV_INTERVAL 0x41
918 
929 #define LCB_CNTL_READ_CHUNKSIZE 0x42
930 
943 #define LCB_CNTL_SELECT_BUCKET 0x44
944 
953 #define LCB_CNTL_TCP_KEEPALIVE 0x45
954 
980 #define LCB_CNTL_CONFIG_POLL_INTERVAL 0x46
981 
993 #define LCB_CNTL_LOG_REDACTION 0x4c
994 
1004 #define LCB_CNTL_ENABLE_TRACING 0x4e
1005 
1006 typedef enum {
1007  LCBTRACE_THRESHOLD_KV = 0,
1008  LCBTRACE_THRESHOLD_QUERY,
1009  LCBTRACE_THRESHOLD_VIEW,
1010  LCBTRACE_THRESHOLD_SEARCH,
1011  LCBTRACE_THRESHOLD_ANALYTICS,
1012  LCBTRACE_THRESHOLD__MAX
1013 } lcbtrace_THRESHOLDOPTS;
1014 
1035 #define LCB_CNTL_TRACING_ORPHANED_QUEUE_FLUSH_INTERVAL 0x4f
1036 
1048 #define LCB_CNTL_TRACING_ORPHANED_QUEUE_SIZE 0x50
1049 
1070 #define LCB_CNTL_TRACING_THRESHOLD_QUEUE_FLUSH_INTERVAL 0x51
1071 
1083 #define LCB_CNTL_TRACING_THRESHOLD_QUEUE_SIZE 0x52
1084 
1093 #define LCB_CNTL_TRACING_THRESHOLD_KV 0x53
1094 
1103 #define LCB_CNTL_TRACING_THRESHOLD_QUERY 0x54
1104 
1113 #define LCB_CNTL_TRACING_THRESHOLD_VIEW 0x55
1123 #define LCB_CNTL_TRACING_THRESHOLD_SEARCH 0x56
1124 
1133 #define LCB_CNTL_TRACING_THRESHOLD_ANALYTICS 0x57
1134 
1140 typedef enum {
1144  LCB_COMPRESS_NONE = 0x00,
1145 
1151  LCB_COMPRESS_IN = 1 << 0,
1152 
1158  LCB_COMPRESS_OUT = 1 << 1,
1159 
1160  LCB_COMPRESS_INOUT = (LCB_COMPRESS_IN | LCB_COMPRESS_OUT),
1161 
1171  LCB_COMPRESS_FORCE = 1 << 2
1173 
1195 #define LCB_CNTL_COMPRESSION_OPTS 0x26
1196 
1205 #define LCB_CNTL_COMPRESSION_MIN_SIZE 0x58
1206 
1215 #define LCB_CNTL_COMPRESSION_MIN_RATIO 0x59
1216 
1226 #define LCB_CNTL_NETWORK 0x5b
1227 
1236 #define LCB_CNTL_HTTP_POOL_TIMEOUT 0x5d
1237 
1243 #define LCB_CNTL_ENABLE_COLLECTIONS 0x4a
1244 
1250 #define LCB_CNTL_ENABLE_DURABLE_WRITE 0x5e
1251 
1256 #define LCB_CNTL_PERSISTENCE_TIMEOUT_FLOOR 0x5f
1257 
1262 #define LCB_CNTL_ALLOW_STATIC_CONFIG 0x60
1263 
1271 #define LCB_CNTL_ANALYTICS_TIMEOUT 0x61
1272 
1278 #define LCB_CNTL_ENABLE_UNORDERED_EXECUTION 0x62
1279 
1287 #define LCB_CNTL_SEARCH_TIMEOUT 0x63
1288 
1298 #define LCB_CNTL_ENABLE_ERRMAP 0x65
1299 
1312 #define LCB_CNTL_OP_METRICS_FLUSH_INTERVAL 0x66
1313 
1327 #define LCB_CNTL_ENABLE_OP_METRICS 0x67
1328 
1333 #define LCB_CNTL__MAX 0x68
1334 
1336 #ifdef __cplusplus
1337 }
1338 #endif
1339 
1340 #include "cntl-private.h"
1341 
1342 #endif /* LCB_CNTL_H */
Decompress incoming data, if the data has been compressed at the server.
Definition: cntl.h:1447
Only retry simple retrieval operations (excludes touch, get-and-touch, and get-locked) which may be r...
Definition: cntl.h:760
lcb_SSLOPTS
SSL options
Definition: cntl.h:656
Select retry for NOT_MY_VBUCKET responses.
Definition: cntl.h:743
Select retry for network errors.
Definition: cntl.h:742
Structure containing mapping information for a key.
Definition: cntl.h:253
disable IPv6
Definition: cntl.h:284
enforce only IPv6
Definition: cntl.h:285
use both IPv6 and IPv4
Definition: cntl.h:286
Do not perform compression in any direction.
Definition: cntl.h:1440
Compress outgoing data.
Definition: cntl.h:1454
Use SSL.
Definition: cntl.h:657
/pools/default/b[s]/$bucket: Introduced in Couchbase Server 2.5
Definition: cntl.h:838
< maximum index
Definition: cntl.h:748
lcb_ipv6_t
Modes for handling IPv6 in the IO layer.
Definition: cntl.h:283
Retry all commands, disregarding any potential unintended receipt of errors or data mutation...
Definition: cntl.h:769
Do not call SSL&#39;s global init functions.
Definition: cntl.h:659
Select retry for topology.
Definition: cntl.h:741
By default the library will send a HELLO command to the server to determine whether compression is su...
Definition: cntl.h:1467
Try 25PLUS first and fallback to COMPAT
Definition: cntl.h:844
Don&#39;t retry any commands.
Definition: cntl.h:755
/pools/default/buckets[Streaming]/$bucket.
Definition: cntl.h:841
lcb_HTCONFIG_URLTYPE
Enumeration representing various URL forms to use for the configuration stream.
Definition: cntl.h:836
Don&#39;t verify certificates.
Definition: cntl.h:658
Retry operations which may potentially fail because they have been accepted by a previous server...
Definition: cntl.h:765
lcb_RETRYCMDOPTS
Definition: cntl.h:751
lcb_COMPRESSOPTS
Options for how to handle compression
Definition: cntl.h:1436
lcb_RETRYMODEOPTS
Select retry mode to manipulate.
Definition: cntl.h:740
Retry when there is no node for the item.
Definition: cntl.h:747