pub struct ConfigStore { /* private fields */ }Expand description
File owner for gateway configuration and aggregate usage.
Implementations§
Source§impl ConfigStore
impl ConfigStore
Sourcepub fn initialize(
state_dir: PathBuf,
listen: SocketAddr,
tls: Option<TlsConfig>,
) -> Result<(Self, GatewayConfig)>
pub fn initialize( state_dir: PathBuf, listen: SocketAddr, tls: Option<TlsConfig>, ) -> Result<(Self, GatewayConfig)>
Initializes an owner-only state directory and new config file.
Sourcepub fn initialize_quick_cloudflare(
state_dir: PathBuf,
listen: SocketAddr,
) -> Result<(Self, GatewayConfig)>
pub fn initialize_quick_cloudflare( state_dir: PathBuf, listen: SocketAddr, ) -> Result<(Self, GatewayConfig)>
Initializes state for an account-free Cloudflare Quick Tunnel.
Sourcepub fn initialize_named_cloudflare(
state_dir: PathBuf,
listen: SocketAddr,
hostname: &str,
token: &str,
) -> Result<(Self, GatewayConfig)>
pub fn initialize_named_cloudflare( state_dir: PathBuf, listen: SocketAddr, hostname: &str, token: &str, ) -> Result<(Self, GatewayConfig)>
Initializes state for one user-owned Cloudflare Tunnel.
Sourcepub fn open(state_dir: PathBuf) -> Result<(Self, GatewayConfig)>
pub fn open(state_dir: PathBuf) -> Result<(Self, GatewayConfig)>
Opens and validates persisted gateway configuration.
Sourcepub fn save(&self, config: &GatewayConfig) -> Result<()>
pub fn save(&self, config: &GatewayConfig) -> Result<()>
Atomically replaces validated persistent configuration.
Sourcepub fn credentials_path(&self) -> PathBuf
pub fn credentials_path(&self) -> PathBuf
Returns the provider credential file path.
Sourcepub fn provider_auth_path(&self) -> PathBuf
pub fn provider_auth_path(&self) -> PathBuf
Returns the provider browser-auth file path.
Sourcepub fn checkpoints_path(&self) -> PathBuf
pub fn checkpoints_path(&self) -> PathBuf
Returns the checkpoint database path.
Sourcepub fn cloudflare_token_path(&self) -> PathBuf
pub fn cloudflare_token_path(&self) -> PathBuf
Returns the owner-only Cloudflare connector-token path.
Trait Implementations§
Source§impl Clone for ConfigStore
impl Clone for ConfigStore
Source§fn clone(&self) -> ConfigStore
fn clone(&self) -> ConfigStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ConfigStore
impl RefUnwindSafe for ConfigStore
impl Send for ConfigStore
impl Sync for ConfigStore
impl Unpin for ConfigStore
impl UnsafeUnpin for ConfigStore
impl UnwindSafe for ConfigStore
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