]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/thrift/lib/erl/README.md
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / thrift / lib / erl / README.md
1 # Thrift Erlang Software Library #
2
3 ## License ##
4
5 Licensed to the Apache Software Foundation (ASF) under one
6 or more contributor license agreements. See the NOTICE file
7 distributed with this work for additional information
8 regarding copyright ownership. The ASF licenses this file
9 to you under the Apache License, Version 2.0 (the
10 "License"); you may not use this file except in compliance
11 with the License. You may obtain a copy of the License at
12
13 http://www.apache.org/licenses/LICENSE-2.0
14
15 Unless required by applicable law or agreed to in writing,
16 software distributed under the License is distributed on an
17 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 KIND, either express or implied. See the License for the
19 specific language governing permissions and limitations
20 under the License.
21
22 ## Release Notes ##
23
24 ### 0.9.2 ###
25
26 as of 0.9.2 struct and function naming conventions have changed. to retain the
27 old naming conventions (for backwards compatibility) use the compiler option
28 `legacynames`
29
30 ## Example ##
31
32 Example session using thrift_client:
33
34 ```erl
35 1> {ok, C0} = thrift_client_util:new("localhost", 9090, thrift_test_thrift, []), ok.
36 ok
37 2> {C1, R1} = thrift_client:call(C0, testVoid, []), R1.
38 {ok,ok}
39 3> {C2, R2} = thrift_client:call(C1, testVoid, [asdf]), R2.
40 {error,{bad_args,testVoid,[asdf]}}
41 4> {C3, R3} = thrift_client:call(C2, testI32, [123]), R3.
42 {ok,123}
43 5> {C4, R4} = thrift_client:call(C3, testOneway, [1]), R4.
44 {ok,ok}
45 6> {C5, R5} = thrift_client:call(C4, testXception, ["foo"]), R5.
46 {error,{no_function,testXception}}
47 7> {C6, R6} = thrift_client:call(C5, testException, ["foo"]), R6.
48 {ok,ok}
49 8> {C7, R7} = (catch thrift_client:call(C6, testException, ["Xception"])), R7.
50 {exception,{xception,1001,<<"Xception">>}}
51 ```