async fn push(
        &self,
        req: Request<api::PushRequest>,
    ) -> Result<TonicResponse<api::Empty>, Status> {
        let mut manager = self.ingester_manager.clone();
        if let Err(e) = block_on(async {
            let (complete_sender, complete_receiver) = oneshot::channel();
            let ingester_req = IngesterPush {
                push_request: req.into_inner(),
                complete_signal: complete_sender,
            };
            if let Err(e) = manager.ingest(ingester_req).await {
                return Err(format!("{}", e));
            }
            if let Err(e) = complete_receiver.await {
                return Err(format!("{}", e));
            }
            return Ok(());
        }) {
            return Err(Status::new(Code::Internal, e));
        }
        Ok(TonicResponse::new(api::Empty {}))
    }
/// push will ingest log line.
push will ingest log line.
push will ingest log line .
async fn push(
        &self,
        req: Request<api::PushRequest>,
    ) -> Result<TonicResponse<api::Empty>, Status> {
        let mut manager = self.ingester_manager.clone();
        if let Err(e) = block_on(async {
            let (complete_sender, complete_receiver) = oneshot::channel();
            let ingester_req = IngesterPush {
                push_request: req.into_inner(),
                complete_signal: complete_sender,
            };
            if let Err(e) = manager.ingest(ingester_req).await {
                return Err(format!("{}", e));
            }
            if let Err(e) = complete_receiver.await {
                return Err(format!("{}", e));
            }
            return Ok(());
        }) {
            return Err(Status::new(Code::Internal, e));
        }
        Ok(TonicResponse::new(api::Empty {}))
    }
async fn push ( & self , req : Request < api :: PushRequest > , ) -> Result < TonicResponse < api :: Empty > , Status > { let mut manager = self . ingester_manager . clone ( ) ; if let Err ( e ) = block_on ( async { let ( complete_sender , complete_receiver ) = oneshot :: channel ( ) ; let ingester_req = IngesterPush { push_request : req . into_inner ( ) , complete_signal : complete_sender , } ; if let Err ( e ) = manager . ingest ( ingester_req ) . await { return Err ( format ! ( " " e ) ) ; } if let Err ( e ) = complete_receiver . await { return Err ( format ! ( " " e ) ) ; } return Ok ( ( ) ) ; } ) { return Err ( Status :: new ( Code :: Internal , e ) ) ; } Ok ( TonicResponse :: new ( api :: Empty { } ) ) }
push will ingest log line.
push will ingest log line .
&self
req
Request<api::PushRequest>