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

Method connScheme

nats.go:2041–2052  ·  view source on GitHub ↗

Helper function to return scheme

()

Source from the content-addressed store, hash-verified

2039
2040// Helper function to return scheme
2041func (nc *Conn) connScheme() string {
2042 if nc.ws {
2043 if nc.Opts.Secure {
2044 return wsSchemeTLS
2045 }
2046 return wsScheme
2047 }
2048 if nc.Opts.Secure {
2049 return tlsScheme
2050 }
2051 return "nats"
2052}
2053
2054// Return true iff u.Hostname() is an IP address.
2055func hostIsIP(u *url.URL) bool {

Callers 2

parseServerURLMethod · 0.95
processInfoMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected