Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UnixNanoID ¶
UnixNanoID use unix nano as id, but it must be increment.
func (*UnixNanoID) GenIDByTS ¶
func (n *UnixNanoID) GenIDByTS(ts int64) int64
GenIDByTS swap, if bigger than current, return it
type UnixNanoNoLockID ¶
type UnixNanoNoLockID struct {
// contains filtered or unexported fields
}
UnixNanoNoLockID lock free -- without lock lock control by caller user
func NewUnixNanoNoLockID ¶
func NewUnixNanoNoLockID(current int64) *UnixNanoNoLockID
NewUnixNanoNoLockID new unix nano id -- without lock
func (*UnixNanoNoLockID) GenIDByTS ¶
func (n *UnixNanoNoLockID) GenIDByTS(ts int64) int64
GenIDByTS swap, if bigger than current, return it
Click to show internal directories.
Click to hide internal directories.