feat(lander): initial integration of lsm
This commit is contained in:
parent
8b6d1f6e91
commit
711eaa2bde
5 changed files with 238 additions and 8 deletions
|
|
@ -2,18 +2,27 @@
|
|||
#define LANDER
|
||||
|
||||
#include "http_loop.h"
|
||||
#include "lsm/store.h"
|
||||
|
||||
extern http_route lander_routes[4];
|
||||
|
||||
typedef struct lander_gctx {
|
||||
const char *data_dir;
|
||||
Trie *trie;
|
||||
lsm_store *store;
|
||||
|
||||
} lander_gctx;
|
||||
|
||||
typedef struct lander_ctx {
|
||||
char *key;
|
||||
lsm_entry_handle *entry;
|
||||
uint64_t remaining_data;
|
||||
} lander_ctx;
|
||||
|
||||
typedef enum lander_entry_type {
|
||||
lander_entry_type_redirect = 0,
|
||||
lander_entry_type_paste = 1,
|
||||
} lander_entry_type;
|
||||
|
||||
void *lander_gctx_init();
|
||||
|
||||
void *lander_ctx_init();
|
||||
|
|
@ -30,4 +39,14 @@ bool lander_post_redirect(event_loop_conn *conn);
|
|||
|
||||
bool lander_post_paste(event_loop_conn *conn);
|
||||
|
||||
bool lander_post_paste_lsm(event_loop_conn *conn);
|
||||
|
||||
bool lander_post_redirect_lsm(event_loop_conn *conn);
|
||||
|
||||
bool lander_stream_body_to_entry(event_loop_conn *conn);
|
||||
|
||||
bool lander_stream_body_to_client(event_loop_conn *conn);
|
||||
|
||||
bool lander_get_entry_lsm(event_loop_conn *conn);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue