pub struct Http {
pub kvs: Arc<Datastore>,
pub sessions: HashMap<Option<Uuid>, Arc<RwLock<Session>>>,
}Fields§
§kvs: Arc<Datastore>§sessions: HashMap<Option<Uuid>, Arc<RwLock<Session>>>Implementations§
Trait Implementations§
Source§impl RpcProtocol for Http
impl RpcProtocol for Http
Source§const LQ_SUPPORT: bool = false
const LQ_SUPPORT: bool = false
Live queries are disabled on HTTP
Source§fn version_data(&self) -> DbResult
fn version_data(&self) -> DbResult
The version information for this RPC context
Source§fn session_map(&self) -> &HashMap<Option<Uuid>, Arc<RwLock<Session>>>
fn session_map(&self) -> &HashMap<Option<Uuid>, Arc<RwLock<Session>>>
A pointer to all active sessions
Source§async fn cleanup_lqs(&self, _session_id: Option<&Uuid>)
async fn cleanup_lqs(&self, _session_id: Option<&Uuid>)
Handles the cleanup of live queries
Source§async fn cleanup_all_lqs(&self)
async fn cleanup_all_lqs(&self)
Handles the cleanup of live queries
Source§async fn begin(
&self,
_txn: Option<Uuid>,
_session_id: Option<Uuid>,
) -> Result<DbResult, TypesError>
async fn begin( &self, _txn: Option<Uuid>, _session_id: Option<Uuid>, ) -> Result<DbResult, TypesError>
Transactions are not supported on HTTP RPC context
Source§async fn commit(
&self,
_txn: Option<Uuid>,
_session_id: Option<Uuid>,
_params: Array,
) -> Result<DbResult, TypesError>
async fn commit( &self, _txn: Option<Uuid>, _session_id: Option<Uuid>, _params: Array, ) -> Result<DbResult, TypesError>
Transactions are not supported on HTTP RPC context
Source§async fn cancel(
&self,
_txn: Option<Uuid>,
_session_id: Option<Uuid>,
_params: Array,
) -> Result<DbResult, TypesError>
async fn cancel( &self, _txn: Option<Uuid>, _session_id: Option<Uuid>, _params: Array, ) -> Result<DbResult, TypesError>
Transactions are not supported on HTTP RPC context
Source§async fn attach(&self, session_id: Option<Uuid>) -> Result<DbResult, Error>
async fn attach(&self, session_id: Option<Uuid>) -> Result<DbResult, Error>
Registers a new session with the given ID
Source§async fn detach(&self, session_id: Option<Uuid>) -> Result<DbResult, Error>
async fn detach(&self, session_id: Option<Uuid>) -> Result<DbResult, Error>
Detaches a session from the given ID
Source§fn get_session(&self, id: &Option<Uuid>) -> Result<Arc<RwLock<Session>>, Error>
fn get_session(&self, id: &Option<Uuid>) -> Result<Arc<RwLock<Session>>, Error>
The current session for this RPC context
Source§fn set_session(&self, id: Option<Uuid>, session: Arc<RwLock<Session>>)
fn set_session(&self, id: Option<Uuid>, session: Arc<RwLock<Session>>)
Mutable access to the current session for this RPC context
Source§async fn del_session(&self, id: &Uuid)
async fn del_session(&self, id: &Uuid)
Deletes a session
Source§async fn get_tx(&self, _id: Uuid) -> Result<Arc<Transaction>, Error>
async fn get_tx(&self, _id: Uuid) -> Result<Arc<Transaction>, Error>
Retrieves a transaction by ID
Source§async fn set_tx(&self, _id: Uuid, _tx: Arc<Transaction>) -> Result<(), Error>
async fn set_tx(&self, _id: Uuid, _tx: Arc<Transaction>) -> Result<(), Error>
Stores a transaction
Source§fn handle_live(
&self,
_lqid: &Uuid,
_session_id: Option<Uuid>,
) -> impl Future<Output = ()> + Send
fn handle_live( &self, _lqid: &Uuid, _session_id: Option<Uuid>, ) -> impl Future<Output = ()> + Send
Handles the execution of a LIVE statement
Source§fn handle_kill(&self, _lqid: &Uuid) -> impl Future<Output = ()> + Send
fn handle_kill(&self, _lqid: &Uuid) -> impl Future<Output = ()> + Send
Handles the execution of a KILL statement
Source§async fn execute(
&self,
txn: Option<Uuid>,
session: Option<Uuid>,
method: Method,
params: Array,
) -> Result<DbResult, Error>
async fn execute( &self, txn: Option<Uuid>, session: Option<Uuid>, method: Method, params: Array, ) -> Result<DbResult, Error>
Executes a method on this RPC implementation
Source§async fn yuse(
&self,
session_id: Option<Uuid>,
params: Array,
) -> Result<DbResult, Error>
async fn yuse( &self, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
Handles the USE RPC method for switching namespace and database context. Read more
async fn signup( &self, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn signin( &self, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn authenticate( &self, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
Source§async fn refresh(
&self,
session_id: Option<Uuid>,
params: Array,
) -> Result<DbResult, Error>
async fn refresh( &self, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
Refreshes an access token using a refresh token. Read more
async fn invalidate(&self, session_id: Option<Uuid>) -> Result<DbResult, Error>
Source§async fn revoke(&self, params: Array) -> Result<DbResult, Error>
async fn revoke(&self, params: Array) -> Result<DbResult, Error>
Revokes a refresh token, preventing it from being used to obtain new access tokens. Read more
async fn reset(&self, session_id: Option<Uuid>) -> Result<DbResult, Error>
async fn info( &self, _txn: Option<Uuid>, session_id: Option<Uuid>, ) -> Result<DbResult, Error>
async fn set( &self, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn unset( &self, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn kill( &self, txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn live( &self, txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn select( &self, txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn insert( &self, txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn insert_relation( &self, txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn create( &self, txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn upsert( &self, txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn update( &self, _txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn merge( &self, txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn patch( &self, _txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn relate( &self, _txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn delete( &self, txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn version( &self, _txn: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn query( &self, txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
async fn run( &self, _txn: Option<Uuid>, session_id: Option<Uuid>, params: Array, ) -> Result<DbResult, Error>
Auto Trait Implementations§
impl !Freeze for Http
impl !RefUnwindSafe for Http
impl Send for Http
impl Sync for Http
impl Unpin for Http
impl UnsafeUnpin for Http
impl !UnwindSafe for Http
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
Add some shareable value to request extensions. Read more
Source§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
Compresses response bodies. Read more
Source§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more
Source§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
Source§fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
Source§fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
Source§fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
Source§fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Insert a header into the request. Read more
Source§fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Append a header into the request. Read more
Source§fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Insert a header into the request, if the header is not already present. Read more
Source§fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Insert a header into the response. Read more
Source§fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Append a header into the response. Read more
Source§fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Insert a header into the response, if the header is not already present. Read more
Source§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
Add request id header and extension. Read more
Source§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
Add request id header and extension, using
x-request-id as the header name. Read moreSource§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
Propgate request ids from requests to responses. Read more
Source§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
Propgate request ids from requests to responses, using
x-request-id as the header name. Read moreSource§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
Catch panics and convert them into
500 Internal Server responses. Read moreSource§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
Intercept requests with over-sized payloads and convert them into
413 Payload Too Large responses. Read more