pub struct ServerConfig {
pub host: String,
pub port: u16,
pub max_concurrent_requests: usize,
pub max_body_bytes: usize,
pub request_timeout: Option<Duration>,
pub batching: BatchConfig,
pub grpc_port: Option<u16>,
pub admin_token: Option<String>,
pub api_keys: Vec<String>,
pub rate_limit: Option<ClientRateLimit>,
pub tls: Option<TlsSettings>,
}Fields§
§host: String§port: u16§max_concurrent_requests: usizeMaximum number of inferences running at once; extra requests get 503
max_body_bytes: usizeMaximum request body size in bytes
request_timeout: Option<Duration>Per-request inference timeout; exceeded requests get 504
batching: BatchConfigDynamic batching of concurrent requests
grpc_port: Option<u16>Port for the Open Inference Protocol over gRPC (feature grpc); None serves HTTP only
admin_token: Option<String>Enables POST /admin/models/{model}/reload for clients presenting this bearer token;
None leaves the admin API off
api_keys: Vec<String>When not empty, every route but the health probes needs one of these keys, as
Authorization: Bearer <key> or X-API-Key: <key>
rate_limit: Option<ClientRateLimit>Per-client rate limit; clients are their API key, or their IP address without keys
tls: Option<TlsSettings>Serve HTTPS (and gRPC over TLS) instead of plain text; needs the tls feature
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§impl Debug for ServerConfig
impl Debug for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
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> 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