righvalor 0.1.0

RighValor: AI Infrastructure and Applications Framework for the Far Edge
use righ_dm_rs::{RighIpv4Addr, RighNodeID};
use serde::{Deserialize, Serialize};

/// # UDS Worker Registration
///
/// Sent by Worker to Master to register its UDS endpoint
/// for direct communication.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct UdsWorkerRegistration {
    /// Worker node identifier
    pub worker_id: RighNodeID,
    /// The IP address of the worker
    pub ipv4_addr: RighIpv4Addr,
}

/// # UDS Registration Response
///
/// Sent by Master to Worker in response to UDS registration
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum UdsRegistrationResponse {
    /// Registration successful
    Accepted,
    /// Registration rejected with reason
    Rejected { reason: String },
}