Method
put
(uuid string, c Communicator)
Source from the content-addressed store, hash-verified
| 47 | } |
| 48 | |
| 49 | func (r *registry) put(uuid string, c Communicator) error { |
| 50 | debug.Assert(uuid != "") |
| 51 | r.mtx.Lock() |
| 52 | defer r.mtx.Unlock() |
| 53 | if _, ok := r.byUUID[uuid]; ok { |
| 54 | return fmt.Errorf("ETL %q already exists", uuid) |
| 55 | } |
| 56 | r.byUUID[uuid] = c |
| 57 | return nil |
| 58 | } |
| 59 | |
| 60 | func (r *registry) getByUUID(uuid string) (c Communicator, exists bool) { |
| 61 | r.mtx.RLock() |
Callers
nothing calls this directly
Tested by
no test coverage detected