[−][src]Struct sonic_channel::ControlChannel
The Sonic Channel Control mode is used for administration purposes. Once in this mode, you cannot switch to other modes or gain access to commands from other modes.
Available commands
In this mode you can use consolidate
, backup
, restore
,
ping
and quit
commands.
Note: This mode requires enabling the control
feature.
Implementations
impl ControlChannel
[src]
pub fn quit(&self) -> Result<<QuitCommand as StreamCommand>::Response>
[src]
Stop connection.
let channel = ControlChannel::start( "localhost:1491", "SecretPassword", )?; channel.quit()?;
pub fn ping(&self) -> Result<<PingCommand as StreamCommand>::Response>
[src]
Ping server.
let channel = ControlChannel::start( "localhost:1491", "SecretPassword", )?; channel.ping()?;
impl ControlChannel
[src]
pub fn consolidate(
&self
) -> Result<<TriggerCommand<'_> as StreamCommand>::Response>
[src]
&self
) -> Result<<TriggerCommand<'_> as StreamCommand>::Response>
Consolidate indexed search data instead of waiting for the next automated consolidation tick.
Note: This method requires enabling the control
feature and start
connection in Control mode.
let control_channel = ControlChannel::start( "localhost:1491", "SecretPassword", )?; let result = control_channel.consolidate()?; assert_eq!(result, true);
pub fn backup<'a>(
&self,
action: &'a str
) -> Result<<TriggerCommand<'_> as StreamCommand>::Response>
[src]
&self,
action: &'a str
) -> Result<<TriggerCommand<'_> as StreamCommand>::Response>
Backup KV + FST to
Note: This method requires enabling the control
feature and start
connection in Control mode.
let control_channel = ControlChannel::start( "localhost:1491", "SecretPassword", )?; let result = control_channel.backup("2020-08-07T23-48")?; assert_eq!(result, true);
pub fn restore<'a>(
&self,
action: &'a str
) -> Result<<TriggerCommand<'_> as StreamCommand>::Response>
[src]
&self,
action: &'a str
) -> Result<<TriggerCommand<'_> as StreamCommand>::Response>
Restore KV + FST from
Note: This method requires enabling the control
feature and start
connection in Control mode.
let control_channel = ControlChannel::start( "localhost:1491", "SecretPassword", )?; let result = control_channel.restore("2020-08-07T23-48")?; assert_eq!(result, true);
Trait Implementations
impl Debug for ControlChannel
[src]
impl SonicChannel for ControlChannel
[src]
type Channel = ControlChannel
Sonic channel struct
pub fn stream(&self) -> &SonicStream
[src]
pub fn start<A, S>(addr: A, password: S) -> Result<Self::Channel> where
A: ToSocketAddrs,
S: ToString,
[src]
A: ToSocketAddrs,
S: ToString,
Auto Trait Implementations
impl RefUnwindSafe for ControlChannel
impl Send for ControlChannel
impl Sync for ControlChannel
impl Unpin for ControlChannel
impl UnwindSafe for ControlChannel
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,