Documentation ¶
Index ¶
- Constants
- func ByteToBinaryString(data byte) (str string)
- func GetSnowflakeId() int64
- func SetMachineId(mid int64)
- func TestRetry(t *testing.T)
- type Bitmap
- type CacheNode
- type LRUCache
- type Node
- type SkipList
- type Sms
- type Stack
- func (stack *Stack) Empty() bool
- func (stack *Stack) Get(idx int) (value interface{})
- func (stack *Stack) Pop() (err error)
- func (stack *Stack) Print()
- func (stack *Stack) Push(value ...interface{})
- func (stack *Stack) Set(idx int, value interface{}) (err error)
- func (stack *Stack) Size() int
- func (stack *Stack) Swap(other *Stack)
- func (stack *Stack) Top() (value interface{})
- type Stop
Constants ¶
View Source
const (
BitSize = 8 // 一个字节8位
)
View Source
const SKIPLIST_MAXLEVEL = 32 // 8
View Source
const SKIPLIST_P = 4
Variables ¶
This section is empty.
Functions ¶
func ByteToBinaryString ¶
ByteToBinaryString函数来源: Go语言版byte变量的二进制字符串表示 http://www.sharejs.com/codes/go/4357
func SetMachineId ¶
func SetMachineId(mid int64)
Types ¶
type LRUCache ¶
type LRUCache struct { Capacity int // contains filtered or unexported fields }
func NewLRUCache ¶
type SkipList ¶
func NewSkipList ¶
func NewSkipList() *SkipList
func (*SkipList) PrintSkipList ¶
func (skipList *SkipList) PrintSkipList()
func (*SkipList) Random_level ¶
Click to show internal directories.
Click to hide internal directories.