()
| 59 | } |
| 60 | |
| 61 | func NewControlPlaneSyncStructure[K comparable, V any]() *Structure[K, V] { |
| 62 | return &Structure[K, V]{ |
| 63 | InternalMap: make(map[K]V), |
| 64 | internalLock: &sync.RWMutex{}, |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | func (s *Structure[K, V]) Lock() { |
| 69 | s.internalLock.Lock() |
no outgoing calls