MCPcopy Create free account
hub / github.com/dadgar/onecache / run

Method run

onecache/memcache_handlers.go:350–369  ·  view source on GitHub ↗
(w io.Writer, data []byte)

Source from the content-addressed store, hash-verified

348}
349
350func (h *appendHandler) run(w io.Writer, data []byte) error {
351 var resp struct{}
352 var err error
353 h.args.Value = data
354 if h.back {
355 err = h.n.server.Prepend(h.args, &resp)
356 } else {
357 err = h.n.server.Append(h.args, &resp)
358 }
359
360 if h.noReply {
361 return nil
362 }
363
364 if err != nil {
365 return sendMsg(w, "NOT_STORED")
366 }
367
368 return sendMsg(w, "STORED")
369}
370
371type incrementHandler struct {
372 n *Node

Callers

nothing calls this directly

Calls 3

sendMsgFunction · 0.85
PrependMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected