31#include <netinet/in.h>
46#define AS_HOSTNAME_SIZE 256
51#define AS_NODE_NAME_SIZE 20
54#define AS_NODE_NAME_MAX_SIZE AS_NODE_NAME_SIZE
56#define AS_FEATURES_PARTITION_SCAN (1 << 0)
57#define AS_FEATURES_QUERY_SHOW (1 << 1)
58#define AS_FEATURES_BATCH_ANY (1 << 2)
59#define AS_FEATURES_PARTITION_QUERY (1 << 3)
61#define AS_ADDRESS4_MAX 4
62#define AS_ADDRESS6_MAX 8
71typedef struct as_address_s {
75 struct sockaddr_storage addr;
88typedef struct as_alias_s {
105typedef struct as_rack_s {
122typedef struct as_racks_s {
154typedef struct as_session_s {
181typedef struct as_async_conn_pool_s {
212typedef struct as_node_metrics_s {
221typedef struct as_node_s {
406typedef struct as_node_info_s {
430 struct sockaddr_storage addr;
568static inline const char*
679struct as_metrics_policy_s;
691static inline uint64_t
710static inline uint64_t
#define AS_IP_ADDRESS_SIZE
#define as_load_ptr(_target)
#define as_incr_uint64(_target)
#define as_incr_uint32(_target)
#define as_store_ptr_rls(_target, _value)
#define as_store_uint8_rls(_target, _value)
#define as_load_uint8_acq(_target)
#define as_load_uint64(_target)
#define as_aaf_uint32_rls(_target, _value)
static bool as_conn_pool_push_head(as_conn_pool *pool, as_socket *sock)
static void as_conn_pool_decr(as_conn_pool *pool)
AS_EXTERN void as_node_destroy(as_node *node)
static void as_node_deactivate(as_node *node)
static void as_node_info_destroy(as_node_info *node_info)
static uint64_t as_node_get_error_count(as_node *node)
void as_node_balance_connections(as_node *node)
static as_session * as_session_load(as_session **session)
void as_node_create_min_connections(as_node *node)
bool as_node_has_rack(as_node *node, const char *ns, int rack_id)
static void as_session_release(as_session *session)
static as_address * as_node_get_address(as_node *node)
static void as_node_close_connection(as_node *node, as_socket *sock, as_conn_pool *pool)
as_node * as_node_create(struct as_cluster_s *cluster, as_node_info *node_info)
static bool as_host_equals(as_host *h1, as_host *h2)
static void as_node_store(as_node **trg, as_node *src)
void as_node_destroy_metrics(as_node *node)
as_status as_node_get_connection(as_error *err, as_node *node, uint32_t socket_timeout, uint64_t deadline_ms, as_socket *sock)
static bool as_node_is_active(const as_node *node)
as_status as_node_authenticate_connection(struct as_cluster_s *cluster, uint64_t deadline_ms)
static const char * as_node_get_address_string(as_node *node)
void as_node_add_address(as_node *node, struct sockaddr *addr)
static void as_node_close_socket(as_node *node, as_socket *sock)
static as_node * as_node_load(as_node **node)
#define AS_NODE_NAME_SIZE
void as_node_release_delayed(as_node *node)
void as_node_enable_metrics(as_node *node, const struct as_metrics_policy_s *policy)
void as_node_add_latency(as_node *node, as_latency_type latency_type, uint64_t elapsed)
static void as_node_add_error(as_node *node)
static void as_node_put_connection(as_node *node, as_socket *sock)
static void as_node_reserve(as_node *node)
void as_node_add_alias(as_node *node, const char *hostname, uint16_t port)
static void as_node_add_timeout(as_node *node)
void as_node_signal_login(as_node *node)
static uint64_t as_node_get_timeout_count(as_node *node)
static void as_node_release(as_node *node)
#define AS_MAX_NAMESPACE_SIZE
void as_socket_close(as_socket *sock)
char name[AS_IP_ADDRESS_SIZE]
as_latency_buckets * latency
as_conn_pool * sync_conn_pools
as_node_metrics * metrics
struct as_cluster_s * cluster
uint32_t partition_generation
uint32_t peers_generation
as_async_conn_pool * pipe_conn_pools
uint32_t sync_conns_opened
uint32_t sync_conns_closed
as_async_conn_pool * async_conn_pools
uint32_t partition_ref_count
uint32_t rebalance_generation
struct as_conn_pool_s * pool