mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-04 12:27:43 +00:00
d74e6eb042
* refactor(targets): move notify net helpers from utils * refactor(tls): centralize runtime foundation * refactor(targets): move notify net helpers from utils * refactor(tls): centralize runtime foundation * feat(tls-runtime): add TLS debug state and admin handler * refactor(tls-runtime): unify TLS debug consumer status view * fix(tls): address PR3065 review feedback * refactor(tls): align debug status payload types * refactor(targets): harden TLS hot reload paths * fix(targets): resolve review-4348251652 findings * fix(targets): finalize tls runtime review follow-ups * fix(targets): harden tls reload and review follow-ups * fix(targets): align tls reload handling across targets * fix(targets): finalize tls reload state and metrics updates * chore(deps): trim unused TLS deps * style(targets): normalize TLS reload formatting * refactor(targets): introduce tls runtime adapter path * chore: update workspace manifests for tls refactor * fix(tls): stabilize material reload and audit workflow * fix(targets): refresh tls fingerprint flow across sinks * fix(tls): align runtime coordinator and http reader updates * fix(sftp): simplify protocol error mapping * fix(tls): harmonize material loading behavior * fix(server): finalize tls material wiring in startup flow * fix(protos): tighten tls generation cache and deps
52 lines
1.5 KiB
Rust
52 lines
1.5 KiB
Rust
// Copyright 2024 RustFS Team
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
use std::time::Duration;
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
pub enum ReloadDetectMode {
|
|
Poll,
|
|
Watch, // TODO: implement fs::watch-based reload
|
|
Hybrid, // TODO: implement poll + fs::watch hybrid
|
|
}
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
pub enum ReloadApplyHint {
|
|
Lazy,
|
|
SoftReconnect,
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
pub struct TlsReloadOptions {
|
|
pub enabled: bool,
|
|
pub detect_mode: ReloadDetectMode,
|
|
pub interval: Duration,
|
|
pub debounce: Duration,
|
|
pub min_stable_age: Duration,
|
|
pub apply_hint: ReloadApplyHint,
|
|
}
|
|
|
|
impl Default for TlsReloadOptions {
|
|
fn default() -> Self {
|
|
Self {
|
|
enabled: true,
|
|
detect_mode: ReloadDetectMode::Poll,
|
|
interval: Duration::from_secs(15),
|
|
debounce: Duration::from_secs(2),
|
|
min_stable_age: Duration::from_secs(1),
|
|
apply_hint: ReloadApplyHint::Lazy,
|
|
}
|
|
}
|
|
}
|