Categorygithub.com/data2/go-idmaker
repositorypackage
0.0.0-20241211033406-ce84e00121f2
Repository: https://github.com/data2/go-idmaker.git
Documentation: pkg.go.dev

# README

Safe and reliable high-performance distributed sequence self increasing base service

License

Safe and reliable high-performance distributed sequence self increasing base service go idmaker

Multiple apps access the base service and obtain the base ID. By default, [id * 1000, (id+1) * 1000) sequence is obtained. After use, a new base ID is requested, similar to the segment lock in Java. The overall architecture is concurrent and secure, with the highest performance

architecture

go-idmaker (2)

start


go run idmaker.go 8080, /idMaker

after starting, access http://ip:${port}/${path}

testing

go test -v -run TestPrettyClientReturn  idmaker_test.go idmaker.go