type InmemLocator struct sync Mutex func self InmemLocator Register na

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
type InmemLocator struct {
*sync.Mutex
}
func (self *InmemLocator) Register(
name, address string,
opts goream.ServiceOptions,
) (string, error) {
self.Mutex.Lock()
defer self.Unlock()
}