pub struct CursorOp {
pub cluster: ClusterId,
pub method: HttpMethod,
pub path: String,
pub body: Vec<u8>,
pub query: Option<String>,
pub endpoint: Option<String>,
pub protocol: Protocol,
pub trace: Option<TraceContext>,
pub forward_headers: Vec<(String, String)>,
}Expand description
A raw cursor passthrough op (docs/03 §6): forward method path with body
to the specific cluster the cursor is pinned to, scroll/PIT continue,
clear, or close. Unlike the typed ops, the destination is already resolved
(the engine recovered it from the cursor’s signed envelope), so this carries
the cluster directly rather than a partition.
Fields§
§cluster: ClusterIdThe cluster the cursor is pinned to.
method: HttpMethodThe HTTP method to forward (continue is POST/GET, clear/close DELETE).
path: StringThe upstream path (e.g. /_search/scroll), already with the real cursor id.
body: Vec<u8>The request body to forward (the real, unwrapped cursor id substituted in).
query: Option<String>An already-allow-listed query string (without the ?) to append to the
upstream URL, e.g. keep_alive=1m on PIT create. Filtered by the engine.
endpoint: Option<String>The pinned cluster’s base URL, when the engine knows it (the placement that
opened the cursor supplied it). None for an affinity continue recovered
from the envelope alone: the sink then reuses the pool the opening request
already built for this cluster, erroring only if none exists.
protocol: ProtocolThe upstream wire protocol. Defaults to Protocol::Http1.
trace: Option<TraceContext>The W3C trace context to forward downstream.
forward_headers: Vec<(String, String)>Client headers to relay verbatim to the upstream (the forwarding policy’s
output). Applied before trace, so a proxy-injected trace
header wins when span export is on. Empty by default.
Implementations§
Source§impl CursorOp
impl CursorOp
Sourcepub fn new(
cluster: ClusterId,
method: HttpMethod,
path: impl Into<String>,
body: Vec<u8>,
) -> Self
pub fn new( cluster: ClusterId, method: HttpMethod, path: impl Into<String>, body: Vec<u8>, ) -> Self
Constructs a cursor passthrough op (defaulting to HTTP/1.1 upstream).
Sourcepub fn with_forward_headers(self, headers: Vec<(String, String)>) -> Self
pub fn with_forward_headers(self, headers: Vec<(String, String)>) -> Self
Sets the client headers to relay verbatim to the upstream (builder style).
Sourcepub fn with_endpoint(self, endpoint: Option<String>) -> Self
pub fn with_endpoint(self, endpoint: Option<String>) -> Self
Sets the pinned cluster’s base URL (builder style), when the engine knows it. Lets the sink build the pool for an affinity request even on an instance that did not serve the opening call.
Sourcepub fn with_protocol(self, protocol: Protocol) -> Self
pub fn with_protocol(self, protocol: Protocol) -> Self
Sets the upstream wire protocol (builder style).
Sourcepub fn with_query(self, query: Option<String>) -> Self
pub fn with_query(self, query: Option<String>) -> Self
Sets the (already allow-listed) upstream query string (builder style).
Sourcepub fn with_trace(self, trace: Option<TraceContext>) -> Self
pub fn with_trace(self, trace: Option<TraceContext>) -> Self
Sets the trace context to propagate downstream (builder style).
Trait Implementations§
impl Eq for CursorOp
impl StructuralPartialEq for CursorOp
Auto Trait Implementations§
impl Freeze for CursorOp
impl RefUnwindSafe for CursorOp
impl Send for CursorOp
impl Sync for CursorOp
impl Unpin for CursorOp
impl UnsafeUnpin for CursorOp
impl UnwindSafe for CursorOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.