HasGRPCScheme returns true if at least one of the URIs in the host expression define "grpc" or "grpcs" scheme.
()
| 219 | // HasGRPCScheme returns true if at least one of the URIs in the host |
| 220 | // expression define "grpc" or "grpcs" scheme. |
| 221 | func (h *HostExpr) HasGRPCScheme() bool { |
| 222 | for _, s := range []string{"grpc", "grpcs"} { |
| 223 | if slices.Contains(h.Schemes(), s) { |
| 224 | return true |
| 225 | } |
| 226 | } |
| 227 | return false |
| 228 | } |
| 229 | |
| 230 | // URIString returns a valid URI string by substituting the parameters with |
| 231 | // their default value if present or the first item in their enum. It returns |