github.com/weedge/lib@v0.0.0-20230424045628-a36dcc1d90e4/container/concurrent_map/int64_key.go (about) 1 package concurrent_map 2 3 type Int64Key struct { 4 value int64 5 } 6 7 // PartitionID is created by string's hash 8 func (i *Int64Key) PartitionKey() int64 { 9 return i.value 10 } 11 12 // Value is the raw string 13 func (i *Int64Key) Value() interface{} { 14 return i.value 15 } 16 17 // StrKey is to convert a string to StringKey 18 func I64Key(key int64) *Int64Key { 19 return &Int64Key{key} 20 }