pub struct ConfigState { /* private fields */ }Implementations§
Source§impl ConfigState
impl ConfigState
pub async fn initialize( data_dir: &Path, token_store: Arc<dyn TokenStore>, ) -> DomainResult<Arc<Self>>
pub fn from_config( config: PipedashConfig, config_path: PathBuf, token_store: Arc<dyn TokenStore>, ) -> Arc<Self> ⓘ
pub async fn get(&self) -> Arc<PipedashConfig> ⓘ
pub fn config_path(&self) -> &PathBuf
pub fn token_store(&self) -> Arc<dyn TokenStore> ⓘ
pub fn platform(&self) -> Platform
pub fn subscribe(&self) -> Receiver<ConfigChangeEvent>
pub fn attach_health(&self, health: HealthHandle)
pub async fn resolve_token( &self, token_ref: &TokenReference, provider_id: Option<i64>, ) -> DomainResult<String>
pub async fn reload(&self) -> DomainResult<ConfigChangeEvent>
pub async fn validate(&self) -> ValidationResult
pub async fn add_provider( &self, id: String, provider: ProviderFileConfig, ) -> DomainResult<()>
pub async fn update_provider( &self, id: &str, provider: ProviderFileConfig, ) -> DomainResult<()>
pub async fn remove_provider(&self, id: &str) -> DomainResult<()>
pub async fn update_general_settings( &self, update: GeneralSettingsUpdate, ) -> DomainResult<()>
pub async fn set_push_relay_url(&self, relay_url: &str) -> DomainResult<()>
pub fn push_relay_from_env() -> bool
pub async fn sync_providers_from_toml( &self, config_backend: &dyn ConfigBackend, delete_orphans: bool, ) -> DomainResult<SyncResult>
pub fn load_file(&self) -> DomainResult<PipedashConfig>
pub fn load_providers( &self, ) -> DomainResult<IndexMap<String, ProviderFileConfig>>
pub async fn remember_provider(&self, id: &str, provider: &ProviderFileConfig)
pub async fn remember_providers( &self, providers: IndexMap<String, ProviderFileConfig>, )
pub async fn remember_views(&self, views: IndexMap<String, ViewFileConfig>)
pub async fn get_string(&self, key: ConfigKey) -> String
pub async fn get_bool(&self, key: ConfigKey) -> bool
pub async fn get_u32(&self, key: ConfigKey) -> u32
Auto Trait Implementations§
impl !Freeze for ConfigState
impl !RefUnwindSafe for ConfigState
impl !UnwindSafe for ConfigState
impl Send for ConfigState
impl Sync for ConfigState
impl Unpin for ConfigState
impl UnsafeUnpin for ConfigState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more