| <?xml version="1.0" encoding="ASCII"?> |
| <idl:Document xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:idl="http://www.apache.org/thrift/IDL"> |
| <definitions xsi:type="idl:Enum" identifier="fb_status" comment="/**
 * Common status reporting mechanism across all services
 */"> |
| <pairs identifier="DEAD" hasFID="true"/> |
| <pairs identifier="STARTING" hasFID="true" fieldID="1"/> |
| <pairs identifier="ALIVE" hasFID="true" fieldID="2"/> |
| <pairs identifier="STOPPING" hasFID="true" fieldID="3"/> |
| <pairs identifier="STOPPED" hasFID="true" fieldID="4"/> |
| <pairs identifier="WARNING" hasFID="true" fieldID="5"/> |
| </definitions> |
| <definitions xsi:type="idl:Service" identifier="FacebookService" comment="/**
 * Standard base service
 */"> |
| <functions comment="/**
 * Returns a descriptive name of the service
 */" identifier="getName"> |
| <funcType> |
| <fieldType> |
| <defType base="string"/> |
| </fieldType> |
| </funcType> |
| </functions> |
| <functions comment="/**
 * Returns the version of the service
 */" identifier="getVersion"> |
| <funcType> |
| <fieldType> |
| <defType base="string"/> |
| </fieldType> |
| </funcType> |
| </functions> |
| <functions comment="/**
 * Gets the status of this service
 */" identifier="getStatus"> |
| <funcType> |
| <fieldType identifier="fb_status"/> |
| </funcType> |
| </functions> |
| <functions comment="/**
 * User friendly description of status, such as why the service is in
 * the dead or warning state, or what is being started or stopped.
 */" identifier="getStatusDetails"> |
| <funcType> |
| <fieldType> |
| <defType base="string"/> |
| </fieldType> |
| </funcType> |
| </functions> |
| <functions comment="/**
 * Gets the counters for this service
 */" identifier="getCounters"> |
| <funcType> |
| <fieldType> |
| <defType> |
| <container xsi:type="idl:MapType" keyword="map"> |
| <keyType> |
| <defType base="string"/> |
| </keyType> |
| <valType> |
| <defType base="i64"/> |
| </valType> |
| </container> |
| </defType> |
| </fieldType> |
| </funcType> |
| </functions> |
| <functions comment="/**
 * Gets the value of a single counter
 */" identifier="getCounter"> |
| <funcType> |
| <fieldType> |
| <defType base="i64"/> |
| </fieldType> |
| </funcType> |
| <args fieldID="1" hasFID="true" identifier="key"> |
| <fieldType> |
| <defType base="string"/> |
| </fieldType> |
| <xsdFieldOpt/> |
| </args> |
| </functions> |
| <functions comment="/**
 * Sets an option
 */" identifier="setOption"> |
| <funcType void="true"/> |
| <args fieldID="1" hasFID="true" identifier="key"> |
| <fieldType> |
| <defType base="string"/> |
| </fieldType> |
| <xsdFieldOpt/> |
| </args> |
| <args fieldID="2" hasFID="true" identifier="value"> |
| <fieldType> |
| <defType base="string"/> |
| </fieldType> |
| <xsdFieldOpt/> |
| </args> |
| </functions> |
| <functions comment="/**
 * Gets an option
 */" identifier="getOption"> |
| <funcType> |
| <fieldType> |
| <defType base="string"/> |
| </fieldType> |
| </funcType> |
| <args fieldID="1" hasFID="true" identifier="key"> |
| <fieldType> |
| <defType base="string"/> |
| </fieldType> |
| <xsdFieldOpt/> |
| </args> |
| </functions> |
| <functions comment="/**
 * Gets all options
 */" identifier="getOptions"> |
| <funcType> |
| <fieldType> |
| <defType> |
| <container xsi:type="idl:MapType" keyword="map"> |
| <keyType> |
| <defType base="string"/> |
| </keyType> |
| <valType> |
| <defType base="string"/> |
| </valType> |
| </container> |
| </defType> |
| </fieldType> |
| </funcType> |
| </functions> |
| <functions comment="/**
 * Returns a CPU profile over the given time interval (client and server
 * must agree on the profile format).
 */" identifier="getCpuProfile"> |
| <funcType> |
| <fieldType> |
| <defType base="string"/> |
| </fieldType> |
| </funcType> |
| <args fieldID="1" hasFID="true" identifier="profileDurationInSec"> |
| <fieldType> |
| <defType base="i32"/> |
| </fieldType> |
| <xsdFieldOpt/> |
| </args> |
| </functions> |
| <functions comment="/**
 * Returns the unix time that the server has been running since
 */" identifier="aliveSince"> |
| <funcType> |
| <fieldType> |
| <defType base="i64"/> |
| </fieldType> |
| </funcType> |
| </functions> |
| <functions comment="/**
 * Tell the server to reload its configuration, reopen log files, etc
 */" isOneway="true" identifier="reinitialize"> |
| <funcType void="true"/> |
| </functions> |
| <functions comment="/**
 * Suggest a shutdown to the server
 */" isOneway="true" identifier="shutdown"> |
| <funcType void="true"/> |
| </functions> |
| </definitions> |
| </idl:Document> |