github.com/nginxinc/kubernetes-ingress@v1.12.5/internal/configs/version2/stream.go (about) 1 package version2 2 3 // TransportServerConfig holds NGINX configuration for a TransportServer. 4 type TransportServerConfig struct { 5 Server StreamServer 6 Upstreams []StreamUpstream 7 StreamSnippets []string 8 Match *Match 9 } 10 11 // StreamUpstream defines a stream upstream. 12 type StreamUpstream struct { 13 Name string 14 Servers []StreamUpstreamServer 15 UpstreamLabels UpstreamLabels 16 LoadBalancingMethod string 17 } 18 19 // StreamUpstreamServer defines a stream upstream server. 20 type StreamUpstreamServer struct { 21 Address string 22 MaxFails int 23 FailTimeout string 24 MaxConnections int 25 } 26 27 // StreamServer defines a server in the stream module. 28 type StreamServer struct { 29 TLSPassthrough bool 30 UnixSocket string 31 Port int 32 UDP bool 33 StatusZone string 34 ProxyRequests *int 35 ProxyResponses *int 36 ProxyPass string 37 Name string 38 Namespace string 39 ProxyTimeout string 40 ProxyConnectTimeout string 41 ProxyNextUpstream bool 42 ProxyNextUpstreamTimeout string 43 ProxyNextUpstreamTries int 44 HealthCheck *StreamHealthCheck 45 ServerSnippets []string 46 } 47 48 // StreamHealthCheck defines a health check for a StreamUpstream in a StreamServer. 49 type StreamHealthCheck struct { 50 Enabled bool 51 Interval string 52 Port int 53 Passes int 54 Jitter string 55 Fails int 56 Timeout string 57 Match string 58 } 59 60 // Match defines a match block for a health check 61 type Match struct { 62 Name string 63 Send string 64 ExpectRegexModifier string 65 Expect string 66 } 67 68 // TLSPassthroughHostsConfig defines a mapping between TLS Passthrough hosts and the corresponding unix sockets. 69 type TLSPassthroughHostsConfig map[string]string