1
0
Fork 0
forked from AbleOS/ableos
ableos/sysdata/programs/kvstore/src/main.hb

37 lines
580 B
Plaintext
Raw Normal View History

2024-05-23 16:59:17 -05:00
Message := struct {
msg_type: u8,
key: String,
value: String,
}
/*
# Message Type
0 => Set Key type
1 => Get Key
*/
recv_msg:= fn(): Message {
return Message.{
msg_type: 0,
key: "",
value: "",
}
}
main := fn(): int {
loop {
msg := recv_msg();
if msg.msg_type == 0 {
continue;
}
if msg.msg_type == 1 {
continue;
}
if 2 <= msg.msg_type {
error("Unexpected message type in the bagging area");
continue;
}
}
return 0;
}