Download Layotto:
git clone https://github.com/mosn/layotto.git
Change directory:
cd layotto/cmd/layotto
Build:
go build
Run Layotto:
./layotto start -c ../../configs/config_in_memory.json
cd ${project_path}/demo/sequencer/common/
go build -o client
./client -s "sequencer_demo"
And you will see:
runtime client initializing for: 127.0.0.1:34904
Try to get next id.Key:key666
Next id:next_id:1
Next id:next_id:2
Next id:next_id:3
Next id:next_id:4
Next id:next_id:5
Next id:next_id:6
Next id:next_id:7
Next id:next_id:8
Next id:next_id:9
Next id:next_id:10
Demo success!