id.go 252 B

123456789101112
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. package id
  4. // 获取分布式唯一id
  5. func GetDistributedUniqueID() (uint64, error) {
  6. if sf == nil {
  7. return 0, nil
  8. }
  9. return sf.NextID()
  10. }