-
Notifications
You must be signed in to change notification settings - Fork 132
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Please provide an in-depth description of the question you have:
Now hashName is in workload controller:
kmesh/pkg/controller/workload/workload_hash.go
Lines 36 to 56 in 167a806
| // HashName converts a string to a uint32 integer as the key of bpf map | |
| type HashName struct { | |
| numToStr map[uint32]string | |
| strToNum map[string]uint32 | |
| } | |
| func NewHashName() *HashName { | |
| hashName := &HashName{ | |
| strToNum: make(map[string]uint32), | |
| } | |
| // if read failed, initialize with an empty map | |
| if err := hashName.readFromPersistFile(); err != nil { | |
| hashName.numToStr = make(map[uint32]string) | |
| } else { | |
| hashName.numToStr = make(map[uint32]string, len(hashName.strToNum)) | |
| for str, num := range hashName.strToNum { | |
| hashName.numToStr[num] = str | |
| } | |
| } | |
| return hashName | |
| } |
In my pr for circuitbreaker #570 , I may need to map cluster name to cluster id to meet the requirement of ebpf stack size limit.

What do you think about this question?:
Environment:
- Kmesh version:
- Others:
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested