Skip to main content

EggressService

Struct EggressService 

Source
pub struct EggressService { /* private fields */ }
Expand description

Pre-start service builder.

Created from a validated config. Call .start() (async) or .start_blocking() to launch the proxy and obtain a handle.

Implementations§

Source§

impl EggressService

Source

pub fn new(config: EggressConfig) -> Self

Create a new service from a validated config.

Source

pub fn from_toml_str(input: &str) -> Result<Self, EggressError>

Convenience: parse TOML and create a service.

Source

pub fn from_toml_file(path: impl AsRef<Path>) -> Result<Self, EggressError>

Convenience: load file and create a service.

Source

pub async fn start(self) -> Result<EggressHandle, EggressError>

Start the service using a caller-provided Tokio runtime context.

The caller must be inside a Tokio runtime. The service binds listeners, starts health probes, and enters the event loop on a background task. Returns once readiness is achieved or startup fails.

Source

pub fn start_blocking(self) -> Result<EggressHandle, EggressError>

Start the service with a dedicated runtime thread (blocking).

This spawns a background thread that creates a Tokio runtime and runs the proxy. Blocks until readiness is achieved or startup fails. Returns a handle that owns the runtime thread.

Source

pub fn start_blocking_with_compatibility_options( self, compatibility_options: CompatibilityOptions, ) -> Result<EggressHandle, EggressError>

Start a compatibility service from the validated in-memory config.

This variant is used by the Python pproxy entry point so compatibility options such as --auth, --sys, -d, and -v reach the runtime without going through a temporary config file or the native defaults.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more