Sha256: 4bf4ea7080a7d9b8fc5f5af9dcf5e893707ae414b2d645bac15909cee52e8582

Contents?: true

Size: 1002 Bytes

Versions: 28

Compression:

Stored size: 1002 Bytes

Contents

%%====================================================================
%% thrift_example 
%%  TODO: COMPLETE
%% RUN:
%%  make deps
%%  make 
%%  make run
%%====================================================================

-module (thrift_example).
-include ("poolparty_types.hrl").
-include ("commandInterface_thrift.hrl").
-include ("poolparty_constants.hrl").

-compile (export_all).

run() ->
  {ok, P} = thrift_client:start_link("localhost", 11223, commandInterface_thrift),
  O1 = cloud_query(P, "app", "name"),
  io:format("Name: ~p~n", [O1]),
  O2 = cloud_query(P, "app", "maximum_instances"),
  io:format("maximum_instances: ~p~n", [O2]),
  O3 = cloud_query(P, "app", "take_args", ["a", "b"]),
  io:format("cloud_provider: ~p~n", [O3]).

cloud_query(P, Name, Meth) ->
  cloud_query(P, Name, Meth, "").
  
cloud_query(P, Name, Meth, Args) ->
  Query = #cloudQuery{name=Name},
  io:format("Query: ~p, ~p, ~p~n", [Query, Meth, Args]),
  thrift_client:call(P, run_command, [Query, Meth, Args]).

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
auser-poolparty-1.3.0 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.1 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.10 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.11 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.12 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.13 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.14 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.15 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.16 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.17 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.2 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.3 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.4 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.5 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.6 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.7 examples/thrift/erlang/src/thrift_example.erl
auser-poolparty-1.3.8 examples/thrift/erlang/src/thrift_example.erl
fairchild-poolparty-1.3.17 examples/thrift/erlang/src/thrift_example.erl
fairchild-poolparty-1.3.5 examples/thrift/erlang/src/thrift_example.erl
poolparty-1.3.15 examples/thrift/erlang/src/thrift_example.erl