mirror of
https://github.com/facebook/sapling.git
synced 2024-12-28 07:33:10 +03:00
7f58caffe4
Summary: This adds a common/ directory with stub files required for building eden. These stubs are the same ones as used in the fboss repository: https://github.com/facebook/fboss/ Our goal is to eventually create an opensource fb303 repository with complete implementations of these files, but for now these basic stubs allow building eden. (Most of the underlying stats code that supports fb303 is already available in folly/stats/ in the folly repository.) Test Plan: Tested building eden on Ubuntu 16.04
54 lines
1.1 KiB
Thrift
54 lines
1.1 KiB
Thrift
/**
|
|
* fb303.thrift
|
|
*
|
|
* Copyright (c) 2006- Facebook
|
|
* Distributed under the Thrift Software License
|
|
*
|
|
* See accompanying file LICENSE or visit the Thrift site at:
|
|
* http://developers.facebook.com/thrift/
|
|
*
|
|
*
|
|
* Definition of common Facebook data types and status reporting mechanisms
|
|
* common to all Facebook services. In some cases, these methods are
|
|
* provided in the base implementation, and in other cases they simply define
|
|
* methods that inheriting applications should implement (i.e. status report)
|
|
*
|
|
* @author Mark Slee <mcslee@facebook.com>
|
|
*/
|
|
|
|
namespace cpp facebook.fb303
|
|
|
|
/**
|
|
* Common status reporting mechanism across all services
|
|
*/
|
|
enum fb_status {
|
|
DEAD = 0,
|
|
STARTING = 1,
|
|
ALIVE = 2,
|
|
STOPPING = 3,
|
|
STOPPED = 4,
|
|
WARNING = 5,
|
|
}
|
|
|
|
/**
|
|
* Standard base service
|
|
*/
|
|
service FacebookService {
|
|
|
|
/**
|
|
* Gets the status of this service
|
|
*/
|
|
fb_status getStatus(),
|
|
|
|
/**
|
|
* Gets the counters for this service
|
|
*/
|
|
map<string, i64> getCounters(),
|
|
|
|
/**
|
|
* Suggest a shutdown to the server
|
|
*/
|
|
oneway void shutdown(),
|
|
|
|
} (priority = 'IMPORTANT')
|