1
0
mirror of synced 2026-04-21 07:48:38 +08:00

auto commit

This commit is contained in:
yitter
2021-03-27 19:49:58 +08:00
parent 561e1a1b3e
commit 2b5744c3e7
4 changed files with 17 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
mod yitgen;
use yitgen::gen::YitIdHelper;
use yitgen::contract::*;
@@ -8,6 +9,11 @@ pub extern "C" fn SetIdGenerator(options: IdGeneratorOptions) {
YitIdHelper::SetIdGenerator(options);
}
#[no_mangle]
pub extern "C" fn SetWorkerId(workerId: u32) {
YitIdHelper::SetWorkerId(workerId);
}
#[no_mangle]
pub extern "C" fn NextId() -> i64 {
YitIdHelper::NextId()