All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
as_config.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2017 Aerospike, Inc.
3  *
4  * Portions may be licensed to Aerospike, Inc. under one or more contributor
5  * license agreements.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
8  * use this file except in compliance with the License. You may obtain a copy of
9  * the License at 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, WITHOUT
13  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14  * License for the specific language governing permissions and limitations under
15  * the License.
16  */
17 #pragma once
18 
19 #include <aerospike/as_error.h>
20 #include <aerospike/as_host.h>
21 #include <aerospike/as_policy.h>
22 #include <aerospike/as_password.h>
23 #include <aerospike/as_vector.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 /******************************************************************************
30  * MACROS
31  *****************************************************************************/
32 
33 #ifdef __linux__
34 /**
35  * Default path to the system UDF files.
36  */
37 #define AS_CONFIG_LUA_SYSTEM_PATH "/opt/aerospike/client/sys/udf/lua"
38 
39 /**
40  * Default path to the user UDF files.
41  */
42 #define AS_CONFIG_LUA_USER_PATH "/opt/aerospike/client/usr/udf/lua"
43 #endif
44 
45 #ifdef __APPLE__
46 /**
47  * Default path to the system UDF files.
48  */
49 #define AS_CONFIG_LUA_SYSTEM_PATH "/usr/local/aerospike/client/sys/udf/lua"
50 
51 /**
52  * Default path to the user UDF files.
53  */
54 #define AS_CONFIG_LUA_USER_PATH "/usr/local/aerospike/client/usr/udf/lua"
55 #endif
56 
57 /**
58  * The size of path strings
59  */
60 #define AS_CONFIG_PATH_MAX_SIZE 256
61 
62 /**
63  * The maximum string length of path strings
64  */
65 #define AS_CONFIG_PATH_MAX_LEN (AS_CONFIG_PATH_MAX_SIZE - 1)
66 
67 /******************************************************************************
68  * TYPES
69  *****************************************************************************/
70 
71 /**
72  * IP translation table.
73  *
74  * @ingroup as_config_object
75  */
76 typedef struct as_addr_map_s {
77 
78  /**
79  * Original hostname or IP address in string format.
80  */
81  char* orig;
82 
83  /**
84  * Use this IP address instead.
85  */
86  char* alt;
87 
88 } as_addr_map;
89 
90 /**
91  * lua module config
92  *
93  * @ingroup as_config_object
94  */
95 typedef struct as_config_lua_s {
96 
97  /**
98  * Enable caching of UDF files in the client
99  * application.
100  */
102 
103  /**
104  * The path to the system UDF files. These UDF files
105  * are installed with the aerospike client library.
106  * Default location defined in: AS_CONFIG_LUA_SYSTEM_PATH
107  */
108  char system_path[AS_CONFIG_PATH_MAX_SIZE];
109 
110  /**
111  * The path to user's UDF files.
112  * Default location defined in: AS_CONFIG_LUA_USER_PATH
113  */
114  char user_path[AS_CONFIG_PATH_MAX_SIZE];
115 
116 } as_config_lua;
117 
118 /**
119  * TLS module config
120  *
121  * @ingroup as_config_object
122  */
123 typedef struct as_config_tls_s {
124 
125  /**
126  * Enable TLS on connections.
127  * By default TLS is disabled.
128  */
129  bool enable;
130 
131  /**
132  * Only encrypt connections; do not verify certificates.
133  * By default TLS will verify certificates.
134  */
136 
137  /**
138  * Path to a trusted CA certificate file.
139  * By default TLS will use system standard trusted CA certificates.
140  * Use as_config_tls_set_cafile() to set this field.
141  */
142  char* cafile;
143 
144  /**
145  * Path to a directory of trusted certificates.
146  * See the OpenSSL SSL_CTX_load_verify_locations manual page for
147  * more information about the format of the directory.
148  * Use as_config_tls_set_capath() to set this field.
149  */
150  char* capath;
151 
152  /**
153  * Specifies enabled protocols.
154  *
155  * This format is the same as Apache's SSLProtocol documented
156  * at https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslprotocol
157  *
158  * If not specified (NULL) the client will use "-all +TLSv1.2".
159  *
160  * If you are not sure what protocols to select this option is
161  * best left unspecified (NULL).
162  *
163  * Use as_config_tls_set_protocols() to set this field.
164  */
165  char* protocols;
166 
167  /**
168  * Specifies enabled cipher suites.
169  *
170  * The format is the same as OpenSSL's Cipher List Format documented
171  * at https://www.openssl.org/docs/manmaster/apps/ciphers.html
172  *
173  * If not specified the OpenSSL default cipher suite described in
174  * the ciphers documentation will be used.
175  *
176  * If you are not sure what cipher suite to select this option
177  * is best left unspecified (NULL).
178  *
179  * Use as_config_tls_set_cipher_suite() to set this field.
180  */
182 
183  /**
184  * Enable CRL checking for the certificate chain leaf certificate.
185  * An error occurs if a suitable CRL cannot be found.
186  * By default CRL checking is disabled.
187  */
188  bool crl_check;
189 
190  /**
191  * Enable CRL checking for the entire certificate chain.
192  * An error occurs if a suitable CRL cannot be found.
193  * By default CRL checking is disabled.
194  */
196 
197  /**
198  * Path to a certificate blacklist file.
199  * The file should contain one line for each blacklisted certificate.
200  * Each line starts with the certificate serial number expressed in hex.
201  * Each entry may optionally specify the issuer name of the
202  * certificate (serial numbers are only required to be unique per
203  * issuer). Example records:
204  * 867EC87482B2 /C=US/ST=CA/O=Acme/OU=Engineering/CN=Test Chain CA
205  * E2D4B0E570F9EF8E885C065899886461
206  *
207  * Use as_config_tls_set_cert_blacklist() to set this field.
208  */
210 
211  /**
212  * Log session information for each connection.
213  */
215 
216  /**
217  * Path to the client's key for mutual authentication.
218  * By default mutual authentication is disabled.
219  *
220  * Use as_config_tls_set_keyfile() to set this field.
221  */
222  char* keyfile;
223 
224  /**
225  * Path to the client's certificate chain file for mutual authentication.
226  * By default mutual authentication is disabled.
227  *
228  * Use as_config_tls_set_certfile() to set this field.
229  */
230  char* certfile;
231 
232 } as_config_tls;
233 
234 /**
235  * The `as_config` contains the settings for the `aerospike` client. Including
236  * default policies, seed hosts in the cluster and other settings.
237  *
238  * ## Initialization
239  *
240  * Before using as_config, you must first initialize it. This will setup the
241  * default values.
242  *
243  * ~~~~~~~~~~{.c}
244  * as_config config;
245  * as_config_init(&config);
246  * ~~~~~~~~~~
247  *
248  * Once initialized, you can populate the values.
249  *
250  * ## Seed Hosts
251  *
252  * The client will require at least one seed host defined in the
253  * configuration. The seed host is defined in `as_config.hosts`.
254  *
255  * ~~~~~~~~~~{.c}
256  * as_config_add_host(&config, "127.0.0.1", 3000);
257  * ~~~~~~~~~~
258  *
259  * The client will iterate over the list until it connects with one of the hosts.
260  *
261  * ## Policies
262  *
263  * The configuration also defines default policies for the application. The
264  * `as_config_init()` function already presets default values for the policies.
265  *
266  * Policies define the behavior of the client, which can be global across
267  * operations, global to a single operation, or local to a single use of an
268  * operation.
269  *
270  * Each database operation accepts a policy for that operation as an a argument.
271  * This is considered a local policy, and is a single use policy. This policy
272  * supersedes any global policy defined.
273  *
274  * If a value of the policy is not defined, then the rule is to fallback to the
275  * global policy for that operation. If the global policy for that operation is
276  * undefined, then the global default value will be used.
277  *
278  * If you find that you have behavior that you want every use of an operation
279  * to utilize, then you can specify the default policy in as_config.policies.
280  *
281  * For example, the `aerospike_key_put()` operation takes an `as_policy_write`
282  * policy. If you find yourself setting the `key` policy value for every call
283  * to `aerospike_key_put()`, then you may find it beneficial to set the global
284  * `as_policy_write` in `as_policies.write`, which all write operations will use.
285  *
286  * ~~~~~~~~~~{.c}
287  * config.policies.write.key = AS_POLICY_KEY_SEND;
288  * ~~~~~~~~~~
289  *
290  * If you find that you want to use a policy value across all operations, then
291  * you may find it beneficial to set the default policy value for that policy
292  * value.
293  *
294  * For example, if you keep setting the key policy value to
295  * `AS_POLICY_KEY_SEND`, then you may want to just set `as_policies.key`. This
296  * will set the global default value for the policy value. So, if an global
297  * operation policy or a local operation policy does not define a value, then
298  * this value will be used.
299  *
300  * ~~~~~~~~~~{.c}
301  * config.policies.key = AS_POLICY_KEY_SEND;
302  * ~~~~~~~~~~
303  *
304  * Global default policy values:
305  * - as_policies.timeout
306  * - as_policies.retry
307  * - as_policies.key
308  * - as_policies.gen
309  * - as_policies.exists
310  *
311  * Global operation policies:
312  * - as_policies.read
313  * - as_policies.write
314  * - as_policies.operate
315  * - as_policies.remove
316  * - as_policies.query
317  * - as_policies.scan
318  * - as_policies.info
319  *
320  *
321  * ## User-Defined Function Settings
322  *
323  * If you are using using user-defined functions (UDF) for processing query
324  * results (i.e aggregations), then you will find it useful to set the
325  * `mod_lua` settings. Of particular importance is the `mod_lua.user_path`,
326  * which allows you to define a path to where the client library will look for
327  * Lua files for processing.
328  *
329  * ~~~~~~~~~~{.c}
330  * strcpy(config.mod_lua.user_path, "/home/me/lua");
331  * ~~~~~~~~~~
332  *
333  * Never call as_config_destroy() directly because ownership of config fields
334  * is transferred to aerospike in aerospike_init() or aerospike_new().
335  *
336  * @ingroup client_objects
337  */
338 typedef struct as_config_s {
339  /**
340  * Seed hosts. Populate with one or more hosts in the cluster that you intend to connect with.
341  * Do not set directly. Use as_config_add_hosts() or as_config_add_host() to add seed hosts.
342  */
344 
345  /**
346  * User authentication to cluster. Leave empty for clusters running without restricted access.
347  */
348  char user[AS_USER_SIZE];
349 
350  /**
351  * Password authentication to cluster. The hashed value of password will be stored by the client
352  * and sent to server in same format. Leave empty for clusters running without restricted access.
353  */
354  char password[AS_PASSWORD_HASH_SIZE];
355 
356  /**
357  * Expected cluster name. If not null, server nodes must return this cluster name in order to
358  * join the client's view of the cluster. Should only be set when connecting to servers that
359  * support the "cluster-name" info command. Use as_config_set_cluster_name() to set this field.
360  * Default: NULL
361  */
363 
364  /**
365  * A IP translation table is used in cases where different clients use different server
366  * IP addresses. This may be necessary when using clients from both inside and outside
367  * a local area network. Default is no translation.
368  *
369  * The key is the IP address returned from friend info requests to other servers. The
370  * value is the real IP address used to connect to the server.
371  *
372  * A deep copy of ip_map is performed in aerospike_connect(). The caller is
373  * responsible for memory deallocation of the original data structure.
374  */
376 
377  /**
378  * Length of ip_map array.
379  * Default: 0
380  */
381  uint32_t ip_map_size;
382 
383  /**
384  * Maximum number of synchronous connections allowed per server node. Synchronous transactions
385  * will go through retry logic and potentially fail with error code "AEROSPIKE_ERR_NO_MORE_CONNECTIONS"
386  * if the maximum number of connections would be exceeded.
387  *
388  * The number of connections used per node depends on how many concurrent threads issue
389  * database commands plus sub-threads used for parallel multi-node commands (batch, scan,
390  * and query). One connection will be used for each thread.
391  *
392  * Default: 300
393  */
395 
396  /**
397  * Maximum number of asynchronous (non-pipeline) connections allowed for each node.
398  * This limit will be enforced at the node/event loop level. If the value is 100 and 2 event
399  * loops are created, then each node/event loop asynchronous (non-pipeline) connection pool
400  * will have a limit of 50. Async transactions will be rejected if the limit would be exceeded.
401  * This variable is ignored if asynchronous event loops are not created.
402  * Default: 300
403  */
405 
406  /**
407  * Maximum number of pipeline connections allowed for each node.
408  * This limit will be enforced at the node/event loop level. If the value is 100 and 2 event
409  * loops are created, then each node/event loop pipeline connection pool will have a limit of 50.
410  * Async transactions will be rejected if the limit would be exceeded.
411  * This variable is ignored if asynchronous event loops are not created.
412  * Default: 64
413  */
415 
416  /**
417  * Number of synchronous connection pools used for each node. Machines with 8 cpu cores or
418  * less usually need just one connection pool per node. Machines with a large number of cpu
419  * cores may have their synchronous performance limited by contention for pooled connections.
420  * Contention for pooled connections can be reduced by creating multiple mini connection pools
421  * per node.
422  *
423  * Default: 1
424  */
426 
427  /**
428  * Initial host connection timeout in milliseconds. The timeout when opening a connection
429  * to the server host for the first time.
430  * Default: 1000
431  */
432  uint32_t conn_timeout_ms;
433 
434  /**
435  * Maximum socket idle time in seconds. Connection pools will discard sockets that have
436  * been idle longer than the maximum. The value is limited to 24 hours (86400).
437  *
438  * It's important to set this value to a few seconds less than the server's proto-fd-idle-ms
439  * (default 60000 milliseconds or 1 minute), so the client does not attempt to use a socket
440  * that has already been reaped by the server.
441  *
442  * Default: 0 seconds (disabled) for non-TLS connections, 55 seconds for TLS connections.
443  */
444  uint32_t max_socket_idle;
445 
446  /**
447  * Polling interval in milliseconds for cluster tender
448  * Default: 1000
449  */
450  uint32_t tender_interval;
451 
452  /**
453  * Number of threads stored in underlying thread pool used by synchronous batch/scan/query commands.
454  * These commands are often sent to multiple server nodes in parallel threads. A thread pool
455  * improves performance because threads do not have to be created/destroyed for each command.
456  * Calculate your value using the following formula:
457  *
458  * thread_pool_size = (concurrent synchronous batch/scan/query commands) * (server nodes)
459  *
460  * If your application only uses async commands, this field can be set to zero.
461  * Default: 16
462  */
464 
465  /**
466  * Client policies
467  */
469 
470  /**
471  * lua config. This is a global config even though it's located here in cluster config.
472  * This config has been left here to avoid breaking the API.
473  *
474  * The global lua config will only be changed once on first cluster initialization.
475  * A better method for initializing lua configuration is to leave this field alone and
476  * instead call aerospike_init_lua():
477  *
478  * ~~~~~~~~~~{.c}
479  * // Get default global lua configuration.
480  * as_config_lua lua;
481  * as_config_lua_init(&lua);
482  *
483  * // Optionally modify lua defaults.
484  * lua.cache_enabled = <enable lua cache>;
485  * strcpy(lua.system_path, <lua system directory>);
486  * strcpy(lua.user_path, <lua user directory>);
487  *
488  * // Initialize global lua configuration.
489  * aerospike_init_lua(&lua);
490  * ~~~~~~~~~~
491  */
493 
494  /*
495  * TLS configuration parameters.
496  */
498 
499  /**
500  * Action to perform if client fails to connect to seed hosts.
501  *
502  * If fail_if_not_connected is true (default), the cluster creation will fail
503  * when all seed hosts are not reachable.
504  *
505  * If fail_if_not_connected is false, an empty cluster will be created and the
506  * client will automatically connect when Aerospike server becomes available.
507  */
509 
510  /**
511  * Flag to signify if "services-alternate" should be used instead of "services"
512  * Default : false
513  */
515 
516  /**
517  * Indicates if shared memory should be used for cluster tending. Shared memory
518  * is useful when operating in single threaded mode with multiple client processes.
519  * This model is used by wrapper languages such as PHP and Python. When enabled,
520  * the data partition maps are maintained by only one process and all other processes
521  * use these shared memory maps.
522  *
523  * Shared memory should not be enabled for multi-threaded programs.
524  * Default: false
525  */
526  bool use_shm;
527 
528  /**
529  * Shared memory identifier. This identifier should be the same for all applications
530  * that use the Aerospike C client.
531  * Default: 0xA6000000
532  */
533  int shm_key;
534 
535  /**
536  * Shared memory maximum number of server nodes allowed. This value is used to size
537  * the fixed shared memory segment. Leave a cushion between actual server node
538  * count and shm_max_nodes so new nodes can be added without having to reboot the client.
539  * Default: 16
540  */
541  uint32_t shm_max_nodes;
542 
543  /**
544  * Shared memory maximum number of namespaces allowed. This value is used to size
545  * the fixed shared memory segment. Leave a cushion between actual namespaces
546  * and shm_max_namespaces so new namespaces can be added without having to reboot the client.
547  * Default: 8
548  */
550 
551  /**
552  * Take over shared memory cluster tending if the cluster hasn't been tended by this
553  * threshold in seconds.
554  * Default: 30
555  */
557 } as_config;
558 
559 /******************************************************************************
560  * FUNCTIONS
561  *****************************************************************************/
562 
563 /**
564  * Initialize the configuration to default values.
565  *
566  * You should do this to ensure the configuration has valid values, before
567  * populating it with custom options.
568  *
569  * ~~~~~~~~~~{.c}
570  * as_config config;
571  * as_config_init(&config);
572  * as_config_add_host(&config, "127.0.0.1", 3000);
573  * ~~~~~~~~~~
574  *
575  * @relates as_config
576  */
577 as_config*
578 as_config_init(as_config* config);
579 
580 /**
581  * Add seed host(s) from a string with format: hostname1[:tlsname1][:port1],...
582  * Hostname may also be an IP address in the following formats.
583  *
584  * ~~~~~~~~~~{.c}
585  * IPv4: xxx.xxx.xxx.xxx
586  * IPv6: [xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]
587  * IPv6: [xxxx::xxxx]
588  * ~~~~~~~~~~
589  *
590  * The host addresses will be copied.
591  * The caller is responsible for the original string.
592  *
593  * ~~~~~~~~~~{.c}
594  * as_config config;
595  * as_config_init(&config);
596  * as_config_add_hosts(&config, "host1,host2:3010,192.168.20.1:3020,[2001::1000]:3030", 3000);
597  * ~~~~~~~~~~
598  *
599  * @relates as_config
600  */
601 bool
602 as_config_add_hosts(as_config* config, const char* string, uint16_t default_port);
603 
604 /**
605  * Add host to seed the cluster.
606  * The host address will be copied.
607  * The caller is responsible for the original address string.
608  *
609  * ~~~~~~~~~~{.c}
610  * as_config config;
611  * as_config_init(&config);
612  * as_config_add_host(&config, "127.0.0.1", 3000);
613  * ~~~~~~~~~~
614  *
615  * @relates as_config
616  */
617 void
618 as_config_add_host(as_config* config, const char* address, uint16_t port);
619 
620 /**
621  * Remove all hosts.
622  *
623  * @relates as_config
624  */
625 void
627 
628 /**
629  * User authentication for servers with restricted access. The password will be stored by the
630  * client and sent to server in hashed format.
631  *
632  * ~~~~~~~~~~{.c}
633  * as_config config;
634  * as_config_init(&config);
635  * as_config_set_user(&config, "charlie", "mypassword");
636  * ~~~~~~~~~~
637  *
638  * @relates as_config
639  */
640 bool
641 as_config_set_user(as_config* config, const char* user, const char* password);
642 
643 /**
644  * Free existing string if not null and copy value to string.
645  */
646 void
647 as_config_set_string(char** str, const char* value);
648 
649 /**
650  * Set expected cluster name.
651  *
652  * @relates as_config
653  */
654 static inline void
655 as_config_set_cluster_name(as_config* config, const char* cluster_name)
656 {
657  as_config_set_string(&config->cluster_name, cluster_name);
658 }
659 
660 /**
661  * Initialize global lua configuration to defaults.
662  *
663  * @relates as_config
664  */
665 static inline void
667 {
668  lua->cache_enabled = false;
669  strcpy(lua->system_path, AS_CONFIG_LUA_SYSTEM_PATH);
670  strcpy(lua->user_path, AS_CONFIG_LUA_USER_PATH);
671 }
672 
673 /**
674  * Set TLS path to a trusted CA certificate file.
675  *
676  * @relates as_config
677  */
678 static inline void
679 as_config_tls_set_cafile(as_config* config, const char* cafile)
680 {
681  as_config_set_string(&config->tls.cafile, cafile);
682 }
683 
684 /**
685  * Set TLS path to a directory of trusted certificates.
686  *
687  * @relates as_config
688  */
689 static inline void
690 as_config_tls_set_capath(as_config* config, const char* capath)
691 {
692  as_config_set_string(&config->tls.capath, capath);
693 }
694 
695 /**
696  * Set TLS enabled protocols.
697  *
698  * @relates as_config
699  */
700 static inline void
701 as_config_tls_set_protocols(as_config* config, const char* protocols)
702 {
703  as_config_set_string(&config->tls.protocols, protocols);
704 }
705 
706 /**
707  * Set TLS enabled cipher suites.
708  *
709  * @relates as_config
710  */
711 static inline void
712 as_config_tls_set_cipher_suite(as_config* config, const char* cipher_suite)
713 {
714  as_config_set_string(&config->tls.cipher_suite, cipher_suite);
715 }
716 
717 /**
718  * Set TLS path to a certificate blacklist file.
719  *
720  * @relates as_config
721  */
722 static inline void
723 as_config_tls_set_cert_blacklist(as_config* config, const char* cert_blacklist)
724 {
725  as_config_set_string(&config->tls.cert_blacklist, cert_blacklist);
726 }
727 
728 /**
729  * Set TLS path to the client's key for mutual authentication.
730  *
731  * @relates as_config
732  */
733 static inline void
734 as_config_tls_set_keyfile(as_config* config, const char* keyfile)
735 {
736  as_config_set_string(&config->tls.keyfile, keyfile);
737 }
738 
739 /**
740  * Set TLS path to the client's certificate chain file for mutual authentication.
741  *
742  * @relates as_config
743  */
744 static inline void
745 as_config_tls_set_certfile(as_config* config, const char* certfile)
746 {
747  as_config_set_string(&config->tls.certfile, certfile);
748 }
749 
750 /**
751  * Add TLS host to seed the cluster.
752  * The host address and TLS name will be copied.
753  * The caller is responsible for the original address string.
754  *
755  * ~~~~~~~~~~{.c}
756  * as_config config;
757  * as_config_init(&config);
758  * as_config_tls_add_host(&config, "127.0.0.1", "node1.test.org", 3000);
759  * ~~~~~~~~~~
760  *
761  * @relates as_config
762  */
763 void
764 as_config_tls_add_host(as_config* config, const char* address, const char* tls_name, uint16_t port);
765 
766 #ifdef __cplusplus
767 } // end extern "C"
768 #endif
uint32_t tender_interval
Definition: as_config.h:450
bool use_services_alternate
Definition: as_config.h:514
uint32_t conn_timeout_ms
Definition: as_config.h:432
uint32_t shm_takeover_threshold_sec
Definition: as_config.h:556
#define AS_USER_SIZE
Definition: as_password.h:29
static void as_config_set_cluster_name(as_config *config, const char *cluster_name)
Definition: as_config.h:655
char * keyfile
Definition: as_config.h:222
bool as_config_set_user(as_config *config, const char *user, const char *password)
as_addr_map * ip_map
Definition: as_config.h:375
bool use_shm
Definition: as_config.h:526
bool fail_if_not_connected
Definition: as_config.h:508
char * cipher_suite
Definition: as_config.h:181
static void as_config_tls_set_protocols(as_config *config, const char *protocols)
Definition: as_config.h:701
int shm_key
Definition: as_config.h:533
as_config_lua lua
Definition: as_config.h:492
uint32_t shm_max_nodes
Definition: as_config.h:541
uint32_t thread_pool_size
Definition: as_config.h:463
uint32_t shm_max_namespaces
Definition: as_config.h:549
uint32_t conn_pools_per_node
Definition: as_config.h:425
bool as_config_add_hosts(as_config *config, const char *string, uint16_t default_port)
bool log_session_info
Definition: as_config.h:214
uint32_t ip_map_size
Definition: as_config.h:381
static void as_config_tls_set_certfile(as_config *config, const char *certfile)
Definition: as_config.h:745
static void as_config_tls_set_cert_blacklist(as_config *config, const char *cert_blacklist)
Definition: as_config.h:723
char * capath
Definition: as_config.h:150
char * cafile
Definition: as_config.h:142
uint32_t max_socket_idle
Definition: as_config.h:444
char * protocols
Definition: as_config.h:165
char * cert_blacklist
Definition: as_config.h:209
as_config * as_config_init(as_config *config)
uint32_t pipe_max_conns_per_node
Definition: as_config.h:414
as_vector * hosts
Definition: as_config.h:343
as_policies policies
Definition: as_config.h:468
void as_config_add_host(as_config *config, const char *address, uint16_t port)
uint32_t max_conns_per_node
Definition: as_config.h:394
#define AS_CONFIG_PATH_MAX_SIZE
Definition: as_config.h:60
static void as_config_tls_set_cafile(as_config *config, const char *cafile)
Definition: as_config.h:679
as_config_tls tls
Definition: as_config.h:497
void as_config_set_string(char **str, const char *value)
bool crl_check
Definition: as_config.h:188
void as_config_tls_add_host(as_config *config, const char *address, const char *tls_name, uint16_t port)
static void as_config_tls_set_capath(as_config *config, const char *capath)
Definition: as_config.h:690
bool cache_enabled
Definition: as_config.h:101
static void as_config_tls_set_cipher_suite(as_config *config, const char *cipher_suite)
Definition: as_config.h:712
static void as_config_tls_set_keyfile(as_config *config, const char *keyfile)
Definition: as_config.h:734
uint32_t async_max_conns_per_node
Definition: as_config.h:404
char * certfile
Definition: as_config.h:230
char system_path[AS_CONFIG_PATH_MAX_SIZE]
Definition: as_config.h:108
bool crl_check_all
Definition: as_config.h:195
static void as_config_lua_init(as_config_lua *lua)
Definition: as_config.h:666
bool encrypt_only
Definition: as_config.h:135
char user_path[AS_CONFIG_PATH_MAX_SIZE]
Definition: as_config.h:114
char * cluster_name
Definition: as_config.h:362
char * alt
Definition: as_config.h:86
#define AS_PASSWORD_HASH_SIZE
Definition: as_password.h:34
char * orig
Definition: as_config.h:81
void as_config_clear_hosts(as_config *config)