snowflake changes from global static variables to one instance per thread

This commit is contained in:
luwenpeng
2024-08-23 15:21:07 +08:00
parent 3014e0feef
commit 6808e6ba29
30 changed files with 420 additions and 167 deletions

View File

@@ -132,6 +132,9 @@ struct session_scan_opts
struct session_manager;
struct session_manager *session_manager_new(struct session_manager_options *opts, uint64_t now_ms);
void session_manager_free(struct session_manager *mgr);
typedef uint64_t (*session_id_generate_fn)(uint64_t now_ms);
void session_manager_set_session_id_generator(struct session_manager *mgr, session_id_generate_fn generator);
void session_manager_record_duplicated_packet(struct session_manager *mgr, const struct packet *pkt);
struct session *session_manager_new_session(struct session_manager *mgr, const struct packet *pkt, uint64_t now_ms);