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

Method SecureDeleteMsg

jsm.go:1424–1434  ·  view source on GitHub ↗

SecureDeleteMsg deletes a message from a stream. The deleted message is overwritten with random data As a result, this operation is slower than DeleteMsg()

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

Source from the content-addressed store, hash-verified

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()
1424func (js *js) SecureDeleteMsg(name string, seq uint64, opts ...JSOpt) error {
1425 o, cancel, err := getJSContextOpts(js.opts, opts...)
1426 if err != nil {
1427 return err
1428 }
1429 if cancel != nil {
1430 defer cancel()
1431 }
1432
1433 return js.deleteMsg(o.ctx, name, &msgDeleteRequest{Seq: seq})
1434}
1435
1436func (js *js) deleteMsg(ctx context.Context, stream string, req *msgDeleteRequest) error {
1437 if err := checkStreamName(stream); err != nil {

Callers

nothing calls this directly

Calls 2

deleteMsgMethod · 0.95
getJSContextOptsFunction · 0.85

Tested by

no test coverage detected