MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / EncodeKey

Method EncodeKey

internal/iplibrary/ip_list_kv_objects.go:47–55  ·  view source on GitHub ↗

EncodeKey generate key for ip item

(item *pb.IPItem)

Source from the content-addressed store, hash-verified

45
46// EncodeKey generate key for ip item
47func (this *IPItemEncoder[T]) EncodeKey(item *pb.IPItem) string {
48 var b = make([]byte, 8)
49 if item.Id < 0 {
50 item.Id = 0
51 }
52
53 binary.BigEndian.PutUint64(b, uint64(item.Id))
54 return string(b)
55}

Callers 1

AddItemMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected