pub struct ForgeBuilder { /* private fields */ }Expand description
Builder for constructing Forge instances
Implementations§
Source§impl ForgeBuilder
impl ForgeBuilder
Sourcepub fn with_nomad_api(self, url: impl Into<String>) -> Self
pub fn with_nomad_api(self, url: impl Into<String>) -> Self
Set the Nomad API endpoint
Sourcepub fn with_nomad_token(self, token: impl Into<String>) -> Self
pub fn with_nomad_token(self, token: impl Into<String>) -> Self
Set the Nomad ACL token
Sourcepub fn with_etcd_endpoints(self, endpoints: Vec<impl Into<String>>) -> Self
pub fn with_etcd_endpoints(self, endpoints: Vec<impl Into<String>>) -> Self
Set etcd endpoints
Sourcepub fn with_store_path(self, path: impl Into<PathBuf>) -> Self
pub fn with_store_path(self, path: impl Into<PathBuf>) -> Self
Set file store path for local storage
Sourcepub fn with_moe_router<R: MoERouter + 'static>(self, router: R) -> Self
pub fn with_moe_router<R: MoERouter + 'static>(self, router: R) -> Self
Set the MoE router
Sourcepub fn with_store(self, store: BoxedStateStore) -> Self
pub fn with_store(self, store: BoxedStateStore) -> Self
Set a custom state store
Sourcepub fn with_autoscaler(self, config: AutoscalerConfig) -> Self
pub fn with_autoscaler(self, config: AutoscalerConfig) -> Self
Set autoscaler configuration
Sourcepub fn with_http_config(self, config: HttpServerConfig) -> Self
pub fn with_http_config(self, config: HttpServerConfig) -> Self
Set HTTP server configuration
Sourcepub fn with_http_addr(self, addr: &str) -> Result<Self>
pub fn with_http_addr(self, addr: &str) -> Result<Self>
Set HTTP bind address
Sourcepub fn with_federation(self, regions: Vec<impl Into<Region>>) -> Self
pub fn with_federation(self, regions: Vec<impl Into<Region>>) -> Self
Enable multi-region federation
Sourcepub fn with_node_name(self, name: impl Into<String>) -> Self
pub fn with_node_name(self, name: impl Into<String>) -> Self
Set node name
Sourcepub fn with_datacenter(self, dc: impl Into<String>) -> Self
pub fn with_datacenter(self, dc: impl Into<String>) -> Self
Set datacenter
Sourcepub fn with_metrics(self, enabled: bool) -> Self
pub fn with_metrics(self, enabled: bool) -> Self
Enable or disable metrics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ForgeBuilder
impl !RefUnwindSafe for ForgeBuilder
impl Send for ForgeBuilder
impl Sync for ForgeBuilder
impl Unpin for ForgeBuilder
impl !UnwindSafe for ForgeBuilder
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> 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 more