Skip to main content

dns_health_check

Function dns_health_check 

Source
pub fn dns_health_check(dns_port: State<'_, DnsPort>) -> Result<bool, String>
Expand description

Performs a quick DNS health check.

Tests basic DNS server functionality and returns a simple pass/fail result. Useful for automated health monitoring.

§Parameters

  • dns_port: Tauri managed state containing the DNS port number

§Returns

Result<bool, String> with true if healthy, false otherwise, or an error message

§Example (JavaScript)

import { invoke } from '@tauri-apps/api/tauri';

const isHealthy = await invoke('dns_health_check');
if (isHealthy) {
  console.log('DNS server is healthy');
} else {
  console.log('DNS server has issues');
}