hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cl_request.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012 Aerospike. All rights reserved.
3  */
4 #pragma once
5 
6 #include <stdbool.h>
7 #include "citrusleaf.h"
8 
9 typedef struct {
10  char* values;
11  char node_name[NODE_NAME_SIZE];
12  char* services;
14 } cl_node_info;
15 
16 typedef struct {
17  char* values;
18 } cl_replicas;
19 
20 int cl_get_node_info(const char* node_name, struct sockaddr_in* sa_in, cl_node_info* node_info, int timeout_ms);
21 int cl_request_node_info(struct sockaddr_in* sa_in, cl_node_info* node_info, int timeout_ms);
22 void cl_node_info_free(cl_node_info* node_info);
23 
24 int cl_get_replicas(const char* node_name, struct sockaddr_in* sa_in, cl_replicas* replicas, int timeout_ms);
25 int cl_request_replicas(struct sockaddr_in* sa_in, cl_replicas* replicas, int timeout_ms);
26 void cl_replicas_free(cl_replicas* replicas);
27 
28 int cl_get_node_name(struct sockaddr_in* sa_in, char* node_name, int timeout_ms);
29 int cl_request_node_name(struct sockaddr_in* sa_in, char* node_name, int timeout_ms);
30 
31 int cl_get_n_partitions(struct sockaddr_in* sa_in, int* n_partitions, int timeout_ms);
32 int cl_request_n_partitions(struct sockaddr_in* sa_in, int* n_partitions, int timeout_ms);
33 
34 bool cl_strncpy(char* trg, const char* src, int len);