mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-08 11:13:55 +00:00
14fe791ef3
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@682458 13f79535-47bb-0310-9956-ffa450edef68
41 lines
821 B
Thrift
41 lines
821 B
Thrift
namespace rb SpecNamespace
|
|
|
|
struct Hello {
|
|
1: string greeting = "hello world"
|
|
}
|
|
|
|
struct Foo {
|
|
1: i32 simple = 53,
|
|
2: string words = "words",
|
|
3: Hello hello = {'greeting' : "hello, world!"},
|
|
4: list<i32> ints = [1, 2, 2, 3],
|
|
5: map<i32, map<string, double>> complex,
|
|
6: set<i16> shorts = [5, 17, 239]
|
|
}
|
|
|
|
struct BoolStruct {
|
|
1: bool yesno = 1
|
|
}
|
|
|
|
struct SimpleList {
|
|
1: list<bool> bools,
|
|
2: list<byte> bytes,
|
|
3: list<i16> i16s,
|
|
4: list<i32> i32s,
|
|
5: list<i64> i64s,
|
|
6: list<double> doubles,
|
|
7: list<string> strings,
|
|
8: list<map<i16, i16>> maps,
|
|
9: list<list<i16>> lists,
|
|
10: list<set<i16>> sets,
|
|
11: list<Hello> hellos
|
|
}
|
|
|
|
service NonblockingService {
|
|
Hello greeting(1:bool english)
|
|
bool block()
|
|
async void unblock(1:i32 n)
|
|
async void shutdown()
|
|
void sleep(1:double seconds)
|
|
}
|