MCPcopy
hub / github.com/nats-io/nats.go / DeleteMsg

Method DeleteMsg

jsm.go:1410–1420  ·  view source on GitHub ↗

DeleteMsg deletes a message from a stream. The message is marked as erased, but not overwritten

(name string, seq uint64, opts ...JSOpt)

Source from the content-addressed store, hash-verified

1408// DeleteMsg deletes a message from a stream.
1409// The message is marked as erased, but not overwritten
1410func (js *js) DeleteMsg(name string, seq uint64, opts ...JSOpt) error {
1411 o, cancel, err := getJSContextOpts(js.opts, opts...)
1412 if err != nil {
1413 return err
1414 }
1415 if cancel != nil {
1416 defer cancel()
1417 }
1418
1419 return js.deleteMsg(o.ctx, name, &msgDeleteRequest{Seq: seq, NoErase: true})
1420}
1421
1422// SecureDeleteMsg deletes a message from a stream. The deleted message is overwritten with random data
1423// As a result, this operation is slower than DeleteMsg()

Callers

nothing calls this directly

Calls 2

deleteMsgMethod · 0.95
getJSContextOptsFunction · 0.85

Tested by

no test coverage detected