so what are these? auto gc and typed observation (because some flett shit is depending on ts)

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
lda
2026-05-01 19:25:03 +07:00
co-authored by Copilot
Verified
parent b5c0626250
commit b5a28c801c
39 changed files with 874 additions and 327 deletions
+3 -1
View File
@@ -11,7 +11,9 @@ pub use service::{
merge_devices, merge_devices_with_observations, resolve_devices, resolve_query,
resolve_selector, resolve_wake_targets, wake_explicit, wake_from_query, wake_targets,
};
pub use wakey_linux::dhcp::{list_local_observations, observe_dhcp_event, observe_neighbor_event};
pub use wakey_linux::observations::{
list_local_observations, observe_dhcp_event, observe_neighbor_event,
};
#[cfg(test)]
mod tests {
+2 -2
View File
@@ -22,7 +22,7 @@ pub async fn resolve_devices(input: impl Into<String>) -> Result<Vec<Device>> {
pub async fn inventory(query: InventoryQuery) -> Result<DeviceInventory> {
let neighbors = wakey_linux::devices::query_neighbors(&query).await?;
let leases = get_leases().await?;
let observations = match wakey_linux::dhcp::list_local_observations().await {
let observations = match wakey_linux::observations::list_local_observations().await {
Ok(observations) => observations
.into_iter()
.filter_map(local_observation_to_fact)
@@ -132,7 +132,7 @@ pub fn merge_devices_with_observations(
}
pub fn local_observation_to_fact(
observation: wakey_linux::dhcp::LocalDeviceObservation,
observation: wakey_linux::observations::LocalDeviceObservation,
) -> Option<DeviceObservationFact> {
let mac = match observation.mac.as_deref() {
Some(raw) => match raw.parse() {