func (lkr *locker) RUnlock(key interface{}) {
	lk, ok := lkr.getLock(key)
	if !ok {
		panic(fmt.Errorf("lock for key '%s' not initialized", key))
	}
	lk.RUnlock()
}
RUnlock undoes a single RLock call for specified key;
it does not affect other simultaneous readers of locker for specified key.
It is a run-time error if locker for specified key is not locked for reading
package instancemgmt
import (
	"fmt"
	"sync"
)
type locker struct {
	locks   map[interface{}]*sync.RWMutex
	locksRW *sync.RWMutex
}
func newLocker() *locker {
	return &locker{
		locks:   make(map[interface{}]*sync.RWMutex),
		locksRW: new(sync.RWMutex),
	}
}
func (lkr *locker) Lock(key interface{}) {
	lk, ok := lkr.getLock(key)
	if !ok {
		lk = lkr.newLock(key)
	}
	lk.Lock()
}
func (lkr *locker) Unlock(key interface{}) {
	lk, ok := lkr.getLock(key)
	if !ok {
		panic(fmt.Errorf("lock for key '%s' not initialized", key))
	}
	lk.Unlock()
}
func (lkr *locker) RLock(key interface{}) {
	lk, ok := lkr.getLock(key)
	if !ok {
		lk = lkr.newLock(key)
	}
	lk.RLock()
}