pub struct Upstream {
pub destination_type: String,
pub destination_namespace: Option<String>,
pub destination_partition: Option<String>,
pub destination_peer: Option<String>,
pub destination_name: String,
pub datacenter: String,
pub local_bind_address: Option<String>,
pub local_bind_port: Option<u16>,
pub local_bind_socket_path: Option<String>,
pub local_bind_socket_mode: Option<String>,
pub mesh_gateway: Option<MeshGatewayConfig>,
pub centrally_configured: Option<bool>,
}
Expand description
Upstream represents a single upstream dependency for a service or proxy. It describes the mechanism used to discover instances to communicate with (the Target) as well as any potential client configuration that may be useful such as load balancer options, timeouts etc.
Fields§
§destination_type: String
Destination fields are the required ones for determining what this upstream points to. Depending on DestinationType some other fields below might further restrict the set of instances allowable.
DestinationType would be better as an int constant but even with custom JSON marshallers it causes havoc with all the mapstructure mangling we do on service definitions in various places.
destination_namespace: Option<String>
§destination_partition: Option<String>
§destination_peer: Option<String>
§destination_name: String
§datacenter: String
Datacenter that the service discovery request should be run against. Note for prepared queries, the actual results might be from a different datacenter.
local_bind_address: Option<String>
LocalBindAddress is the ip address a side-car proxy should listen on for traffic destined for this upstream service. Default if empty is 127.0.0.1.
local_bind_port: Option<u16>
LocalBindPort is the ip address a side-car proxy should listen on for traffic destined for this upstream service. Required.
local_bind_socket_path: Option<String>
These are exclusive with LocalBindAddress/LocalBindPort
local_bind_socket_mode: Option<String>
This might be represented as an int, but because it’s octal outputs can be a bit strange.
mesh_gateway: Option<MeshGatewayConfig>
MeshGateway is the configuration for mesh gateway usage of this upstream
centrally_configured: Option<bool>
CentrallyConfigured indicates whether the upstream was defined in a proxy instance registration or whether it was generated from a config entry.