get_instances_from_zone

Function get_instances_from_zone 

Source
pub fn get_instances_from_zone(
    dnszone: &DNSZone,
    bind9_instances_store: &Store<Bind9Instance>,
) -> Result<Vec<InstanceReference>>
Expand description

Get instances from a DNSZone based on bind9_instances_from selectors.

This function:

  • Uses the reflector store for O(1) lookups without API calls
  • Single source of truth: DNSZone owns the zone-instance relationship

§Arguments

  • dnszone - The DNSZone resource to get instances for
  • bind9_instances_store - The reflector store for querying Bind9Instance resources

§Returns

  • Ok(Vec<InstanceReference>) - List of instances serving this zone
  • Err(_) - If no instances match the bind9_instances_from selectors

§Errors

Returns an error if no instances are found matching the label selectors.