xref: /Universal-ctags/Units/parser-thrift.r/exception.d/input.thrift (revision 3532d59142ccaeca9f031e3321f22acc80f28ca6)
1// Taken from https://thrift.apache.org/
2/**
3 * Ahh, now onto the cool part, defining a service. Services just need a name
4 * and can optionally inherit from another service using the extends keyword.
5 */
6service Calculator extends shared.SharedService {
7
8  /**
9   * A method definition looks like C code. It has a return type, arguments,
10   * and optionally a list of exceptions that it may throw. Note that argument
11   * lists and exception lists are specified using the exact same syntax as
12   * field lists in struct or exception definitions.
13   */
14
15   void ping(),
16
17   i32 add(1:i32 num1, 2:i32 num2),
18
19   i32 calculate(1:i32 logid, 2:Work w) throws (1:InvalidOperation ouch),
20
21   /**
22    * This method has a oneway modifier. That means the client only makes
23    * a request and does not listen for any response at all. Oneway methods
24    * must be void.
25    */
26   oneway void zip()
27
28}
29