pub trait DynamicHandlerSink: Send + Sync {
// Required methods
fn register_crd(&self, spec: CrdHandlerSpec);
fn unregister_crd(&self, group: &str, version: &str, plural: &str) -> bool;
}Expand description
Typed sink the apiserver implements so the controller (which must NOT
depend on engenho-apiserver — that would be a dependency cycle, since
apiserver already depends on controllers for admission) can mutate the
live RouterState handler table.
The apiserver impl builds a StoreBackedHandler::new(store, g, v, kind, plural, namespaced).with_registration_metadata(short_names, singular, categories).with_admission(chain) and calls RouterState::register /
::unregister. Threading short_names + singular from spec.names
into with_registration_metadata is the ONE load-bearing wiring detail
that makes kubectl get wd + kubectl api-resources resolve the CR.
Required Methods§
Sourcefn register_crd(&self, spec: CrdHandlerSpec)
fn register_crd(&self, spec: CrdHandlerSpec)
Register a CR-instance handler under (group, version, plural) with
the given scope + discovery metadata. Idempotent (a re-register is a
harmless overwrite of the same GVK).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".