pub struct MeshPeerRequest {
pub schema: String,
pub request_id: String,
pub target_tenant_id: TenantId,
pub target_core_id: CoreId,
pub method: String,
pub path: String,
pub body: Vec<u8>,
pub bearer_token: Option<String>,
pub timeout_ms: u64,
pub max_response_bytes: usize,
}Expand description
Logical Peer RPC HTTP request forwarded through a Gateway worker socket.
Fields§
§schema: StringSchema marker. Must be MESH_HTTP_SCHEMA_V1.
request_id: StringStable request identity.
target_tenant_id: TenantIdTenant boundary for the target worker.
target_core_id: CoreIdTarget Core connected to the Gateway as a worker.
method: StringHTTP method from the logical Peer RPC request.
path: StringPeer RPC path from the logical request.
body: Vec<u8>Encoded logical request body.
bearer_token: Option<String>Optional bearer credential forwarded to the target peer host.
timeout_ms: u64Per-attempt timeout in milliseconds.
max_response_bytes: usizeMaximum accepted response body bytes.
Implementations§
Source§impl MeshPeerRequest
impl MeshPeerRequest
Sourcepub fn new(
request_id: impl Into<String>,
target_tenant_id: TenantId,
target_core_id: CoreId,
request: PeerRpcHttpRequest,
) -> Self
pub fn new( request_id: impl Into<String>, target_tenant_id: TenantId, target_core_id: CoreId, request: PeerRpcHttpRequest, ) -> Self
Builds a mesh relay request from a logical Peer RPC HTTP request.
Sourcepub fn into_peer_request(self) -> Result<PeerRpcHttpRequest, PeerRpcError>
pub fn into_peer_request(self) -> Result<PeerRpcHttpRequest, PeerRpcError>
Converts this relay request back to a logical Peer RPC HTTP request.
Sourcepub fn validate_schema(&self) -> Result<(), PeerRpcError>
pub fn validate_schema(&self) -> Result<(), PeerRpcError>
Validates the mesh relay schema marker.
Trait Implementations§
Source§impl Clone for MeshPeerRequest
impl Clone for MeshPeerRequest
Source§fn clone(&self) -> MeshPeerRequest
fn clone(&self) -> MeshPeerRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MeshPeerRequest
impl Debug for MeshPeerRequest
Source§impl<'de> Deserialize<'de> for MeshPeerRequest
impl<'de> Deserialize<'de> for MeshPeerRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MeshPeerRequest
Source§impl PartialEq for MeshPeerRequest
impl PartialEq for MeshPeerRequest
Source§impl Serialize for MeshPeerRequest
impl Serialize for MeshPeerRequest
impl StructuralPartialEq for MeshPeerRequest
Auto Trait Implementations§
impl Freeze for MeshPeerRequest
impl RefUnwindSafe for MeshPeerRequest
impl Send for MeshPeerRequest
impl Sync for MeshPeerRequest
impl Unpin for MeshPeerRequest
impl UnsafeUnpin for MeshPeerRequest
impl UnwindSafe for MeshPeerRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more