pub struct BlueGreenConfig {
pub base_model_path: PathBuf,
pub host: String,
pub blue_port: u16,
pub green_port: u16,
pub n_gpu_layers: u32,
pub ctx_size: u32,
pub parallel: u32,
pub data_dir: PathBuf,
pub server_path: String,
pub startup_timeout_secs: u64,
pub switching_behavior: SwitchingBehavior,
}Expand description
Blue-Green 設定
Fields§
§base_model_path: PathBufベースモデルのパス (GGUF)
host: Stringホスト
blue_port: u16Blue サーバーのポート
green_port: u16Green サーバーのポート
n_gpu_layers: u32GPU レイヤー数
ctx_size: u32コンテキストサイズ
parallel: u32並列スロット数
data_dir: PathBufデータディレクトリ(PID/ログファイル用)
server_path: Stringllama-server コマンドパス
startup_timeout_secs: u64サーバー起動タイムアウト(秒)
switching_behavior: SwitchingBehavior切り替え中のリクエスト挙動
Implementations§
Source§impl BlueGreenConfig
impl BlueGreenConfig
Sourcepub fn green_port(self, port: u16) -> Self
pub fn green_port(self, port: u16) -> Self
Green ポートを設定
Sourcepub fn n_gpu_layers(self, n: u32) -> Self
pub fn n_gpu_layers(self, n: u32) -> Self
GPU レイヤー数を設定
Sourcepub fn server_path(self, path: impl Into<String>) -> Self
pub fn server_path(self, path: impl Into<String>) -> Self
サーバーパスを設定
Sourcepub fn switching_behavior(self, behavior: SwitchingBehavior) -> Self
pub fn switching_behavior(self, behavior: SwitchingBehavior) -> Self
切り替え中の挙動を設定
Sourcepub fn wait_during_switch(self) -> Self
pub fn wait_during_switch(self) -> Self
切り替え中は待機するモードに設定
Sourcepub fn wait_during_switch_with_timeout(self, timeout_secs: u64) -> Self
pub fn wait_during_switch_with_timeout(self, timeout_secs: u64) -> Self
切り替え中は待機するモードに設定(タイムアウト指定)
Trait Implementations§
Source§impl Clone for BlueGreenConfig
impl Clone for BlueGreenConfig
Source§fn clone(&self) -> BlueGreenConfig
fn clone(&self) -> BlueGreenConfig
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 BlueGreenConfig
impl Debug for BlueGreenConfig
Auto Trait Implementations§
impl Freeze for BlueGreenConfig
impl RefUnwindSafe for BlueGreenConfig
impl Send for BlueGreenConfig
impl Sync for BlueGreenConfig
impl Unpin for BlueGreenConfig
impl UnwindSafe for BlueGreenConfig
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 more