-
Notifications
You must be signed in to change notification settings - Fork 6
/
msg.thrift
46 lines (40 loc) · 731 Bytes
/
msg.thrift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* All Struct Msg for client <-> server
**/
/**
* base msg
**/
struct Base {
1: required string id // random msg id
2: required string sender // info of sender
}
/**
* the Caller
**/
struct Call {
1: required string name // service name
2: required string action // service[action]
3: optional string params // json of params
}
/**
* Calling send
**/
struct CMsg {
1: required Base base
2: required Call call
}
/**
* Response send
* res is a json include `result`
**/
struct RMsg {
1: required Base base
2: required string res
}
exception ThriftCallingException {
1: required string err
2: optional string message
}
service Message {
RMsg call(1: CMsg msg) throws (1: ThriftCallingException err)
}