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 struct sockaddr_in;
39 
40 /******************************************************************************
41  * FUNCTIONS
42  ******************************************************************************/
43 
44 /**
45  * @private
46  * Send info command to specific host. The values must be freed by the caller on success.
47  */
49 as_info_command_host(as_cluster* cluster, as_error* err, struct sockaddr_in* sa_in, char* command,
50  bool send_asis, uint64_t deadline_ms, char** response);
51 
52 /**
53  * @private
54  * Return the single command's info response buffer value.
55  * The original buffer will be modified with the null termination character.
56  */
58 as_info_parse_single_response(char *values, char **value);
59 
60 /**
61  * @private
62  * Parse info response buffer into name/value pairs, one for each command.
63  * The original buffer will be modified with null termination characters to
64  * delimit each command name and value referenced by the name/value pairs.
65  */
66 void
67 as_info_parse_multi_response(char* buf, as_vector* /* <as_name_value> */ values);
68 
69 #ifdef __cplusplus
70 } // end extern "C"
71 #endif
as_status
Definition: as_status.h:30
void as_info_parse_multi_response(char *buf, as_vector *values)
as_status as_info_parse_single_response(char *values, char **value)
char * value
Definition: as_info.h:35
char * name
Definition: as_info.h:34
as_status as_info_command_host(as_cluster *cluster, as_error *err, struct sockaddr_in *sa_in, char *command, bool send_asis, uint64_t deadline_ms, char **response)