Stores

Struct Stores 

Source
pub struct Stores {
Show 13 fields pub cluster_bind9_providers: Store<ClusterBind9Provider>, pub bind9_clusters: Store<Bind9Cluster>, pub bind9_instances: Store<Bind9Instance>, pub bind9_deployments: Store<Deployment>, pub dnszones: Store<DNSZone>, pub a_records: Store<ARecord>, pub aaaa_records: Store<AAAARecord>, pub cname_records: Store<CNAMERecord>, pub txt_records: Store<TXTRecord>, pub mx_records: Store<MXRecord>, pub ns_records: Store<NSRecord>, pub srv_records: Store<SRVRecord>, pub caa_records: Store<CAARecord>,
}
Expand description

Collection of all reflector stores for cross-operator queries.

Each store is populated by a dedicated reflector task and provides in-memory access to resources without API calls.

Fields§

§cluster_bind9_providers: Store<ClusterBind9Provider>§bind9_clusters: Store<Bind9Cluster>§bind9_instances: Store<Bind9Instance>§bind9_deployments: Store<Deployment>§dnszones: Store<DNSZone>§a_records: Store<ARecord>§aaaa_records: Store<AAAARecord>§cname_records: Store<CNAMERecord>§txt_records: Store<TXTRecord>§mx_records: Store<MXRecord>§ns_records: Store<NSRecord>§srv_records: Store<SRVRecord>§caa_records: Store<CAARecord>

Implementations§

Source§

impl Stores

Source

pub fn records_matching_selector( &self, selector: &LabelSelector, namespace: &str, ) -> Vec<RecordRef>

Query all record stores and return matching records for a label selector.

This method searches across all 8 record type stores to find records that:

  1. Exist in the specified namespace
  2. Match the provided label selector
§Arguments
  • selector - The label selector to match against record labels
  • namespace - The namespace to search within (namespace-isolated)
§Returns

A vector of RecordRef enums containing references to all matching records

Source

pub fn dnszones_matching_selector( &self, selector: &LabelSelector, namespace: &str, ) -> Vec<(String, String)>

Query dnszones matching a label selector.

§Arguments
  • selector - The label selector to match against zone labels
  • namespace - The namespace to search within
§Returns

A vector of (name, namespace) tuples for matching zones

Source

pub fn bind9instances_matching_selector( &self, selector: &LabelSelector, namespace: &str, ) -> Vec<(String, String)>

Query Bind9Instances matching a label selector.

§Arguments
  • selector - The label selector to match against instance labels
  • namespace - The namespace to search within
§Returns

A vector of (name, namespace) tuples for matching instances

Source

pub fn dnszones_selecting_record( &self, record_labels: &BTreeMap<String, String>, record_namespace: &str, ) -> Vec<(String, String)>

Find all DNSZones whose recordsFrom selector matches given record labels.

This is a “reverse lookup” - given a record’s labels, find which zones select it. Used by record watch mappers to determine which zones need reconciliation when a record changes.

§Arguments
  • record_labels - The labels of the record to match
  • record_namespace - The namespace of the record
§Returns

A vector of (name, namespace) tuples for zones that select this record

Source

pub fn get_dnszone(&self, name: &str, namespace: &str) -> Option<Arc<DNSZone>>

Get a specific DNSZone by name and namespace from the store.

§Arguments
  • name - The name of the zone
  • namespace - The namespace of the zone
§Returns

An Arc<DNSZone> if found, None otherwise

Source

pub fn get_bind9instance( &self, name: &str, namespace: &str, ) -> Option<Arc<Bind9Instance>>

Get a specific Bind9Instance by name and namespace from the store.

§Arguments
  • name - The name of the instance
  • namespace - The namespace of the instance
§Returns

An Arc<Bind9Instance> if found, None otherwise

Source

pub fn get_deployment( &self, name: &str, namespace: &str, ) -> Option<Arc<Deployment>>

Get a specific Deployment by name and namespace from the store.

§Arguments
  • name - The name of the deployment
  • namespace - The namespace of the deployment
§Returns

An Arc<Deployment> if found, None otherwise

Source

pub fn create_bind9_manager_for_instance( &self, instance_name: &str, instance_namespace: &str, ) -> Bind9Manager

Create a Bind9Manager for a specific instance with deployment-aware auth.

This helper function looks up the deployment for the given instance and creates a Bind9Manager with proper authentication detection. If the deployment is found, it creates a manager that can determine auth status by inspecting the bindcar container’s environment variables. If not found, it falls back to a basic manager that assumes auth is enabled.

§Arguments
  • instance_name - Name of the Bind9Instance
  • instance_namespace - Namespace of the instance
§Returns

A Bind9Manager configured for the instance

§Examples
let manager = stores.create_bind9_manager_for_instance(
    "my-instance",
    "bindy-system"
);

Trait Implementations§

Source§

impl Clone for Stores

Source§

fn clone(&self) -> Stores

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl Freeze for Stores

§

impl !RefUnwindSafe for Stores

§

impl Send for Stores

§

impl Sync for Stores

§

impl Unpin for Stores

§

impl !UnwindSafe for Stores

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

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].
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ServiceExt for T

§

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body. Read more
§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Follow redirect resposes using the Standard policy. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more