pub struct ProxyConfig {
pub upstreams: Vec<UpstreamConfig>,
pub routes: Vec<RouteConfig>,
pub tcp_proxies: Vec<TcpProxyConfig>,
pub udp_proxies: Vec<UdpProxyConfig>,
pub ws_proxies: Vec<WsProxyConfig>,
pub global_middleware: MiddlewareConfig,
pub authz: Option<AuthzConfig>,
}Available on non-WebAssembly only.
Fields§
§upstreams: Vec<UpstreamConfig>§routes: Vec<RouteConfig>§tcp_proxies: Vec<TcpProxyConfig>§udp_proxies: Vec<UdpProxyConfig>§ws_proxies: Vec<WsProxyConfig>§global_middleware: MiddlewareConfig§authz: Option<AuthzConfig>[authz]: the relationship schema and seed tuples. Since 18.14.0.
Implementations§
Source§impl ProxyConfig
impl ProxyConfig
Sourcepub fn validate(&self, report: &mut ConfigReport)
pub fn validate(&self, report: &mut ConfigReport)
Check the configuration for mistakes the parser lets through. Reads the auth secrets’ environment variables and htpasswd files, so run it in the environment the server will run in.
Source§impl ProxyConfig
impl ProxyConfig
Sourcepub fn is_proxy_mode() -> bool
pub fn is_proxy_mode() -> bool
Returns true if rws.config.toml (or RWS_CONFIG_FILE) contains
[[route]] or [[upstream]] sections, meaning config-driven mode
should be used.
Sourcepub fn load() -> ProxyConfig
pub fn load() -> ProxyConfig
Parse the config file and return a ProxyConfig.
Sourcepub fn from_str(toml: &str) -> ProxyConfig
pub fn from_str(toml: &str) -> ProxyConfig
Parse toml text directly into a ProxyConfig. Used in tests.
Trait Implementations§
Source§impl Clone for ProxyConfig
impl Clone for ProxyConfig
Source§fn clone(&self) -> ProxyConfig
fn clone(&self) -> ProxyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProxyConfig
impl RefUnwindSafe for ProxyConfig
impl Send for ProxyConfig
impl Sync for ProxyConfig
impl Unpin for ProxyConfig
impl UnsafeUnpin for ProxyConfig
impl UnwindSafe for ProxyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Available on crate feature
map-response-body only.Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
Available on crate feature
trace only.High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
Available on crate feature
trace only.High level tracing that classifies responses using gRPC headers. Read more