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 new(base_model_path: impl Into<PathBuf>) -> BlueGreenConfig
pub fn new(base_model_path: impl Into<PathBuf>) -> BlueGreenConfig
新しい設定を作成
Sourcepub fn host(self, host: impl Into<String>) -> BlueGreenConfig
pub fn host(self, host: impl Into<String>) -> BlueGreenConfig
ホストを設定
Sourcepub fn blue_port(self, port: u16) -> BlueGreenConfig
pub fn blue_port(self, port: u16) -> BlueGreenConfig
Blue ポートを設定
Sourcepub fn green_port(self, port: u16) -> BlueGreenConfig
pub fn green_port(self, port: u16) -> BlueGreenConfig
Green ポートを設定
Sourcepub fn n_gpu_layers(self, n: u32) -> BlueGreenConfig
pub fn n_gpu_layers(self, n: u32) -> BlueGreenConfig
GPU レイヤー数を設定
Sourcepub fn parallel(self, n: u32) -> BlueGreenConfig
pub fn parallel(self, n: u32) -> BlueGreenConfig
並列スロット数を設定
Sourcepub fn data_dir(self, path: impl Into<PathBuf>) -> BlueGreenConfig
pub fn data_dir(self, path: impl Into<PathBuf>) -> BlueGreenConfig
データディレクトリを設定
Sourcepub fn server_path(self, path: impl Into<String>) -> BlueGreenConfig
pub fn server_path(self, path: impl Into<String>) -> BlueGreenConfig
サーバーパスを設定
Sourcepub fn switching_behavior(self, behavior: SwitchingBehavior) -> BlueGreenConfig
pub fn switching_behavior(self, behavior: SwitchingBehavior) -> BlueGreenConfig
切り替え中の挙動を設定
Sourcepub fn wait_during_switch(self) -> BlueGreenConfig
pub fn wait_during_switch(self) -> BlueGreenConfig
切り替え中は待機するモードに設定
Sourcepub fn wait_during_switch_with_timeout(
self,
timeout_secs: u64,
) -> BlueGreenConfig
pub fn wait_during_switch_with_timeout( self, timeout_secs: u64, ) -> BlueGreenConfig
切り替え中は待機するモードに設定(タイムアウト指定)
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
Source§impl Default for BlueGreenConfig
impl Default for BlueGreenConfig
Source§fn default() -> BlueGreenConfig
fn default() -> BlueGreenConfig
Returns the “default value” for a type. Read more
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