Files
ldb/ebpf/c/replica.h
2026-01-29 10:47:24 +00:00

36 lines
615 B
C

#ifndef __REPLICA_H__
#define __REPLICA_H__
enum event_type {
EVENT_CREATE_SNAPSHOT_ASYNC,
EVENT_CREATE_SNAPSHOT_OK,
EVENT_CREATE_SNAPSHOT_READY,
EVENT_COMPLETED_CMD
};
struct event {
enum event_type type;
union {
struct {
char ip[16];
__u32 port;
} sync;
struct {
__u8 cmd[256];
__u64 len;
} cmd;
struct {
char array_file[128];
char rbtree_file[128];
char hash_file[128];
} ok;
} data;
};
enum state {
NOSLAVE,
PREPARING,
ONLINE
};
#endif