pub trait PolarisGrpc:
Send
+ Sync
+ 'static {
type DiscoverStream: Stream<Item = Result<DiscoverResponse, Status>> + Send + 'static;
// Required methods
fn report_client<'life0, 'async_trait>(
&'life0 self,
request: Request<Client>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register_instance<'life0, 'async_trait>(
&'life0 self,
request: Request<Instance>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn deregister_instance<'life0, 'async_trait>(
&'life0 self,
request: Request<Instance>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn discover<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<DiscoverRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DiscoverStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn heartbeat<'life0, 'async_trait>(
&'life0 self,
request: Request<Instance>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with PolarisGrpcServer.
Required Associated Types§
Sourcetype DiscoverStream: Stream<Item = Result<DiscoverResponse, Status>> + Send + 'static
type DiscoverStream: Stream<Item = Result<DiscoverResponse, Status>> + Send + 'static
Server streaming response type for the Discover method.
Required Methods§
Sourcefn report_client<'life0, 'async_trait>(
&'life0 self,
request: Request<Client>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn report_client<'life0, 'async_trait>(
&'life0 self,
request: Request<Client>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
客户端上报
Sourcefn register_instance<'life0, 'async_trait>(
&'life0 self,
request: Request<Instance>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_instance<'life0, 'async_trait>(
&'life0 self,
request: Request<Instance>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
被调方注册服务实例
Sourcefn deregister_instance<'life0, 'async_trait>(
&'life0 self,
request: Request<Instance>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn deregister_instance<'life0, 'async_trait>(
&'life0 self,
request: Request<Instance>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
被调方反注册服务实例