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

Method convertDomain

jetstream/jetstream.go:663–672  ·  view source on GitHub ↗

If we have a Domain, convert to the appropriate ext.APIPrefix. This will change the stream source, so should be a copy passed in.

()

Source from the content-addressed store, hash-verified

661// If we have a Domain, convert to the appropriate ext.APIPrefix.
662// This will change the stream source, so should be a copy passed in.
663func (ss *StreamSource) convertDomain() error {
664 if ss.Domain == "" {
665 return nil
666 }
667 if ss.External != nil {
668 return errors.New("nats: domain and external are both set")
669 }
670 ss.External = &ExternalStream{APIPrefix: fmt.Sprintf(jsExtDomainT, ss.Domain)}
671 return nil
672}
673
674// Helper for copying when we do not want to change user's version.
675func (ss *StreamSource) copy() *StreamSource {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected