pub struct RndcExecutor { /* private fields */ }Expand description
RNDC command executor using native protocol
Implementations§
Source§impl RndcExecutor
impl RndcExecutor
Sourcepub fn new(server: String, algorithm: String, secret: String) -> Result<Self>
pub fn new(server: String, algorithm: String, secret: String) -> Result<Self>
Create a new RNDC executor
§Arguments
server- RNDC server address (e.g., “127.0.0.1:953”)algorithm- HMAC algorithm, accepts both formats:- With prefix: “hmac-md5”, “hmac-sha1”, “hmac-sha224”, “hmac-sha256”, “hmac-sha384”, “hmac-sha512”
- Without prefix: “md5”, “sha1”, “sha224”, “sha256”, “sha384”, “sha512”
secret- Base64-encoded RNDC secret key
§Returns
A new RndcExecutor instance
Sourcepub async fn addzone(
&self,
zone_name: &str,
zone_config: &str,
) -> Result<String>
pub async fn addzone( &self, zone_name: &str, zone_config: &str, ) -> Result<String>
Add a zone
§Arguments
zone_name- Name of the zone (e.g., “example.com”)zone_config- Zone configuration block (e.g., “{ type primary; file "/var/cache/bind/example.com.zone"; }”)
Sourcepub async fn zonestatus(&self, zone_name: &str) -> Result<String>
pub async fn zonestatus(&self, zone_name: &str) -> Result<String>
Get zone status
Sourcepub async fn freeze(&self, zone_name: &str) -> Result<String>
pub async fn freeze(&self, zone_name: &str) -> Result<String>
Freeze a zone (disable dynamic updates)
Sourcepub async fn thaw(&self, zone_name: &str) -> Result<String>
pub async fn thaw(&self, zone_name: &str) -> Result<String>
Thaw a zone (enable dynamic updates)
Sourcepub async fn notify(&self, zone_name: &str) -> Result<String>
pub async fn notify(&self, zone_name: &str) -> Result<String>
Notify secondaries about zone changes
Sourcepub async fn retransfer(&self, zone_name: &str) -> Result<String>
pub async fn retransfer(&self, zone_name: &str) -> Result<String>
Force a zone retransfer from primary
This command is used on secondary zones to discard the current zone data and initiate a fresh transfer from the primary server.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RndcExecutor
impl RefUnwindSafe for RndcExecutor
impl Send for RndcExecutor
impl Sync for RndcExecutor
impl Unpin for RndcExecutor
impl UnwindSafe for RndcExecutor
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].