mirror of
https://github.com/wassname/ray.git
synced 2026-07-05 08:48:13 +08:00
db8c0acc71
* make db_connect return the connection * rename db_conn -> db_handle * more renaming * clang-format * free the db_handle
24 lines
661 B
C
24 lines
661 B
C
#ifndef DB_H
|
|
#define DB_H
|
|
|
|
#include "event_loop.h"
|
|
|
|
typedef struct db_handle_impl db_handle;
|
|
|
|
/* Connect to the global system store at address and port. Returns
|
|
* a handle to the database, which must be freed with db_disconnect
|
|
* after use. */
|
|
db_handle *db_connect(const char *db_address,
|
|
int db_port,
|
|
const char *client_type,
|
|
const char *client_addr,
|
|
int client_port);
|
|
|
|
/* Attach global system store connection to event loop. */
|
|
void db_attach(db_handle *db, event_loop *loop);
|
|
|
|
/* Disconnect from the global system store. */
|
|
void db_disconnect(db_handle *db);
|
|
|
|
#endif
|