Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

Commit

Permalink
open source fb303_status and getStatus
Browse files Browse the repository at this point in the history
Summary:
Move fb_status into open source fb303 and rename it to fb303_status.

Also add a getStatus() call to BaseService.

Reviewed By: wez

Differential Revision: D15800271

fbshipit-source-id: de217fb1245618d757ee853cb3ab19c7aa5dc964
  • Loading branch information
chadaustin authored and facebook-github-bot committed Jul 11, 2019
1 parent 5727c6c commit b9f18bd
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions apiserver/src/thrift/facebook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ use futures_ext::{BoxFuture, FutureExt};

use fb303::fb_status;
use fb303::server::FacebookService;
use fb303::services::facebook_service::GetStatusExn;
use fb303_core::server::BaseService;
use fb303_core::services::base_service::{GetNameExn, GetStatusDetailsExn};
use fb303_core::services::base_service::{GetNameExn, GetStatusDetailsExn, GetStatusExn};

#[derive(Clone)]
pub struct FacebookServiceImpl {}
Expand All @@ -21,13 +20,12 @@ impl BaseService for FacebookServiceImpl {
Ok("Mononoke API Server".to_string()).into_future().boxify()
}

fn getStatus(&self) -> BoxFuture<fb_status, GetStatusExn> {
Ok(fb_status::ALIVE).into_future().boxify()
}
fn getStatusDetails(&self) -> BoxFuture<String, GetStatusDetailsExn> {
Ok("Alive and running.".to_string()).into_future().boxify()
}
}

impl FacebookService for FacebookServiceImpl {
fn getStatus(&self) -> BoxFuture<fb_status, GetStatusExn> {
Ok(fb_status::ALIVE).into_future().boxify()
}
}
impl FacebookService for FacebookServiceImpl {}

0 comments on commit b9f18bd

Please sign in to comment.