Seal will seal the object store, no further modifications will be allowed.
()
| 1027 | |
| 1028 | // Seal will seal the object store, no further modifications will be allowed. |
| 1029 | func (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 |
| 1043 | type objWatcher struct { |
nothing calls this directly
no test coverage detected