Haka: modules/misc/elasticsearch/haka/elasticsearch.h Source File

Haka

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

elasticsearch.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #ifndef ELASTICSEARCH_H_
6 #define ELASTICSEARCH_H_
7
8 #define ELASTICSEARCH_ID_LENGTH 24
9
10 #include <haka/types.h>
11 #include <haka/time.h>
12
13 #include "json.h"
14
15
16 struct elasticsearch_connector;
17
18 struct elasticsearch_connector *elasticsearch_connector_new(const char *server);
19 bool elasticsearch_connector_close(struct elasticsearch_connector *connector);
20 void elasticsearch_genid(char *id, size_t size);
21 bool elasticsearch_newindex(struct elasticsearch_connector *connector,
22 const char *index, json_t *data);
23 bool elasticsearch_formattimestamp(const struct time *time,
24 char *timestr, size_t size);
25 bool elasticsearch_insert(struct elasticsearch_connector *connector,
26 const char *index, const char *type, const char *id, json_t *doc);
27 bool elasticsearch_update(struct elasticsearch_connector *connector,
28 const char *index, const char *type, const char *id, json_t *doc);
29
30 #endif /* ELASTICSEARCH_H_ */
types.h
time.h
time
Definition: time.h:21