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

Method Seal

object.go:1029–1040  ·  view source on GitHub ↗

Seal will seal the object store, no further modifications will be allowed.

()

Source from the content-addressed store, hash-verified

1027
1028// Seal will seal the object store, no further modifications will be allowed.
1029func (obs *obs) Seal() error {
1030 stream := fmt.Sprintf(objNameTmpl, obs.name)
1031 si, err := obs.js.StreamInfo(stream)
1032 if err != nil {
1033 return err
1034 }
1035 // Seal the stream from being able to take on more messages.
1036 cfg := si.Config
1037 cfg.Sealed = true
1038 _, err = obs.js.UpdateStream(&cfg)
1039 return err
1040}
1041
1042// Implementation for Watch
1043type objWatcher struct {

Callers

nothing calls this directly

Calls 2

StreamInfoMethod · 0.65
UpdateStreamMethod · 0.65

Tested by

no test coverage detected