pub struct GatewayConfig {
pub enabled: bool,
pub bind: String,
pub port: u16,
pub auth_token: Option<String>,
pub rate_limit: u32,
pub max_body_size: usize,
}Expand description
HTTP webhook gateway configuration, nested under [gateway] in TOML.
When enabled = true, an HTTP server accepts webhook payloads and injects them
as user messages into the agent. Requires the gateway feature flag.
§Example (TOML)
[gateway]
enabled = true
bind = "127.0.0.1"
port = 8090
auth_token = "secret"
rate_limit = 60
max_body_size = 1048576Fields§
§enabled: boolEnable the HTTP gateway. Default: false.
bind: StringIP address to bind the gateway to. Default: "127.0.0.1".
port: u16Port to listen on. Default: 8090.
auth_token: Option<String>Bearer token for request authentication. When set, all requests must include
Authorization: Bearer <token>. Default: None (no auth).
rate_limit: u32Maximum requests per minute. Must be > 0. Default: 120.
max_body_size: usizeMaximum request body size in bytes. Must be <= 10 MiB. Default: 1048576 (1 MiB).
Trait Implementations§
Source§impl Clone for GatewayConfig
impl Clone for GatewayConfig
Source§fn clone(&self) -> GatewayConfig
fn clone(&self) -> GatewayConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GatewayConfig
impl Debug for GatewayConfig
Source§impl Default for GatewayConfig
impl Default for GatewayConfig
Source§fn default() -> GatewayConfig
fn default() -> GatewayConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GatewayConfig
impl<'de> Deserialize<'de> for GatewayConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GatewayConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GatewayConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for GatewayConfig
impl Serialize for GatewayConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for GatewayConfig
impl RefUnwindSafe for GatewayConfig
impl Send for GatewayConfig
impl Sync for GatewayConfig
impl Unpin for GatewayConfig
impl UnsafeUnpin for GatewayConfig
impl UnwindSafe for GatewayConfig
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request