Struct bulwark_config::Service

source ·
pub struct Service {
    pub port: u16,
    pub admin_port: u16,
    pub admin_enabled: bool,
    pub remote_state_uri: Option<String>,
    pub remote_state_pool_size: u32,
    pub proxy_hops: u8,
}
Expand description

Configuration for the services being launched.

Fields§

§port: u16

The port for the primary service.

§admin_port: u16

The port for the admin service and health checks.

§admin_enabled: bool

True if the admin service is enabled, false otherwise.

§remote_state_uri: Option<String>

The URI for the external Redis state store.

§remote_state_pool_size: u32

The size of the remote state connection pool.

§proxy_hops: u8

The number of trusted proxy hops expected to be exterior to Bulwark.

This number does not include Bulwark or the proxy hosting it in the proxy hop count. Zero implies that there are no other proxies exterior to Bulwark. This is used to ensure the Forwarded and X-Forwarded-For headers are not spoofed. If this is set incorrectly, the client IP reported to plugins will be incorrect.

Trait Implementations§

source§

impl Debug for Service

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Service

source§

fn default() -> Self

Default service config

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.