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

Method copy

jsm.go:302–314  ·  view source on GitHub ↗

Helper for copying when we do not want to change user's version.

()

Source from the content-addressed store, hash-verified

300
301// Helper for copying when we do not want to change user's version.
302func (ss *StreamSource) copy() *StreamSource {
303 nss := *ss
304 // Check pointers
305 if ss.OptStartTime != nil {
306 t := *ss.OptStartTime
307 nss.OptStartTime = &t
308 }
309 if ss.External != nil {
310 ext := *ss.External
311 nss.External = &ext
312 }
313 return &nss
314}
315
316// If we have a Domain, convert to the appropriate ext.APIPrefix.
317// This will change the stream source, so should be a copy passed in.

Callers 2

CreateKeyValueMethod · 0.45
AddStreamMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected