MCPcopy
hub / github.com/NVIDIA/aistore / put

Method put

etl/registry.go:49–58  ·  view source on GitHub ↗
(uuid string, c Communicator)

Source from the content-addressed store, hash-verified

47}
48
49func (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
60func (r *registry) getByUUID(uuid string) (c Communicator, exists bool) {
61 r.mtx.RLock()

Callers

nothing calls this directly

Calls 3

AssertFunction · 0.92
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected