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

Method convertDomain

jsm.go:318–329  ·  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

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.
318func (ss *StreamSource) convertDomain() error {
319 if ss.Domain == _EMPTY_ {
320 return nil
321 }
322 if ss.External != nil {
323 // These should be mutually exclusive.
324 // TODO(dlc) - Make generic?
325 return errors.New("nats: domain and external are both set")
326 }
327 ss.External = &ExternalStream{APIPrefix: fmt.Sprintf(jsExtDomainT, ss.Domain)}
328 return nil
329}
330
331// apiResponse is a standard response from the JetStream JSON API
332type apiResponse struct {

Callers 1

AddStreamMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected