If we have a Domain, convert to the appropriate ext.APIPrefix. This will change the stream source, so should be a copy passed in.
()
| 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. |
| 663 | func (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. |
| 675 | func (ss *StreamSource) copy() *StreamSource { |
no outgoing calls
no test coverage detected