Skip to main content

ora_server/
grpc.rs

1use std::sync::Arc;
2
3use ora_backend::Backend;
4use wgroup::WaitGroupHandle;
5
6use crate::{
7    executor_pool::ExecutorPool,
8    proto::{
9        admin::v1::admin_service_server::AdminService,
10        executors::v1::execution_service_server::ExecutionService,
11    },
12};
13
14mod admin;
15mod conv;
16mod executors;
17
18/// Types implementing all the services of an ora server.
19pub trait GrpcServices: ExecutionService + AdminService {}
20impl<B> GrpcServices for GrpcImpl<B> where B: Backend {}
21
22pub(super) struct GrpcImpl<B> {
23    pub(crate) backend: Arc<B>,
24    pub(crate) executor_pool: ExecutorPool,
25    pub(crate) wg: WaitGroupHandle,
26}