sonyflake + pod hostname as machine id
https://github.com/sony/sonyflake
The hostname of a Container is the name of the Pod in which the Container is running. It is available through the hostname command or the gethostname function call in libc. Link
Language | Source |
---|---|
Go | kubeflake.go |
Typescript | kubeflake.ts |