All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
as_info.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2016 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_cluster.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /******************************************************************************
26  * TYPES
27  *****************************************************************************/
28 
29 /**
30  * @private
31  * Name value pair.
32  */
33 typedef struct as_name_value_s {
34  char* name;
35  char* value;
37 
38 /******************************************************************************
39  * FUNCTIONS
40  ******************************************************************************/
41 
42 /**
43  * @private
44  * Send info command to specific node. The values must be freed by the caller on success.
45  */
48  as_error* err, as_node* node, char* command, bool send_asis, uint64_t deadline_ms,
49  char** response
50  );
51 
52 /**
53  * @private
54  * Send info command to specific host. The values must be freed by the caller on success.
55  */
58  as_cluster* cluster, as_error* err, struct sockaddr* addr, char* command,
59  bool send_asis, uint64_t deadline_ms, char** response, const char* tls_name
60  );
61 
62 /**
63  * @private
64  * Send info command to specific socket. The values must be freed by the caller on success.
65  * Set max_response_length to zero if response size should not be bounded.
66  */
69  as_error* err, as_socket* sock, char* names, bool send_asis, uint64_t deadline_ms,
70  uint64_t max_response_length, char** values
71  );
72 
73 /**
74  * @private
75  * Create and authenticate socket for info requests.
76  */
79  as_cluster* cluster, as_error* err, struct sockaddr* addr, uint64_t deadline_ms,
80  const char* tls_name, as_socket* sock
81  );
82 
83 /**
84  * @private
85  * Return the single command's info response buffer value.
86  * The original buffer will be modified with the null termination character.
87  */
89 as_info_parse_single_response(char *values, char **value);
90 
91 /**
92  * @private
93  * Parse info response buffer into name/value pairs, one for each command.
94  * The original buffer will be modified with null termination characters to
95  * delimit each command name and value referenced by the name/value pairs.
96  */
97 void
98 as_info_parse_multi_response(char* buf, as_vector* /* <as_name_value> */ values);
99 
100 #ifdef __cplusplus
101 } // end extern "C"
102 #endif