Instance defines network protocols for ports
const ( // GRPC declares that the port carries gRPC traffic. GRPC Instance = "GRPC" // GRPCWeb declares that the port carries gRPC traffic. GRPCWeb Instance = "GRPC-Web" // HTTP declares that the port carries HTTP/1.1 traffic. // Note that HTTP/1.0 or earlier may not be supported by the proxy. HTTP Instance = "HTTP" // HTTP_PROXY declares that the port is a generic outbound proxy port. // Note that this is currently applicable only for defining sidecar egress listeners. // nolint: naming HTTP_PROXY Instance = "HTTP_PROXY" // HTTP2 declares that the port carries HTTP/2 traffic. HTTP2 Instance = "HTTP2" // HTTPS declares that the port carries HTTPS traffic. HTTPS Instance = "HTTPS" // TCP declares the the port uses TCP. // This is the default protocol for a service port. TCP Instance = "TCP" // TLS declares that the port carries TLS traffic. // TLS traffic is assumed to contain SNI as part of the handshake. TLS Instance = "TLS" // UDP declares that the port uses UDP. // Note that UDP protocol is not currently supported by the proxy. UDP Instance = "UDP" // Mongo declares that the port carries MongoDB traffic. Mongo Instance = "Mongo" // Redis declares that the port carries Redis traffic. Redis Instance = "Redis" // MySQL declares that the port carries MySQL traffic. MySQL Instance = "MySQL" // Unsupported - value to signify that the protocol is unsupported. Unsupported Instance = "UnsupportedProtocol" )
Parse from string ignoring case
IsGRPC is true for GRCP protocols.
IsHTTP is true for protocols that use HTTP as transport protocol
IsHTTP2 is true for protocols that use HTTP/2 as transport protocol
IsTCP is true for protocols that use TCP as transport protocol
IsTLS is true for protocols on top of TLS (e.g. HTTPS)