|
|
|
|
@ -61,7 +61,15 @@
|
|
|
|
|
|
|
|
|
|
-type pub() :: #pub{}.
|
|
|
|
|
|
|
|
|
|
-type deploy() :: #deploy{}.
|
|
|
|
|
-type command() :: #command{}.
|
|
|
|
|
|
|
|
|
|
-type rpc_deploy() :: #rpc_deploy{}.
|
|
|
|
|
|
|
|
|
|
-type rpc_start_container() :: #rpc_start_container{}.
|
|
|
|
|
|
|
|
|
|
-type rpc_stop_container() :: #rpc_stop_container{}.
|
|
|
|
|
|
|
|
|
|
-type rpc_config_container() :: #rpc_config_container{}.
|
|
|
|
|
|
|
|
|
|
-type fetch_task_log() :: #fetch_task_log{}.
|
|
|
|
|
|
|
|
|
|
@ -73,9 +81,9 @@
|
|
|
|
|
|
|
|
|
|
-type ping() :: #ping{}.
|
|
|
|
|
|
|
|
|
|
-export_type(['auth_request'/0, 'auth_reply'/0, 'pub'/0, 'deploy'/0, 'fetch_task_log'/0, 'container_config'/0, 'data'/0, 'event'/0, 'ping'/0]).
|
|
|
|
|
-type '$msg_name'() :: auth_request | auth_reply | pub | deploy | fetch_task_log | container_config | data | event | ping.
|
|
|
|
|
-type '$msg'() :: auth_request() | auth_reply() | pub() | deploy() | fetch_task_log() | container_config() | data() | event() | ping().
|
|
|
|
|
-export_type(['auth_request'/0, 'auth_reply'/0, 'pub'/0, 'command'/0, 'rpc_deploy'/0, 'rpc_start_container'/0, 'rpc_stop_container'/0, 'rpc_config_container'/0, 'fetch_task_log'/0, 'container_config'/0, 'data'/0, 'event'/0, 'ping'/0]).
|
|
|
|
|
-type '$msg_name'() :: auth_request | auth_reply | pub | command | rpc_deploy | rpc_start_container | rpc_stop_container | rpc_config_container | fetch_task_log | container_config | data | event | ping.
|
|
|
|
|
-type '$msg'() :: auth_request() | auth_reply() | pub() | command() | rpc_deploy() | rpc_start_container() | rpc_stop_container() | rpc_config_container() | fetch_task_log() | container_config() | data() | event() | ping().
|
|
|
|
|
-export_type(['$msg_name'/0, '$msg'/0]).
|
|
|
|
|
|
|
|
|
|
-if(?OTP_RELEASE >= 24).
|
|
|
|
|
@ -105,7 +113,11 @@ encode_msg(Msg, MsgName, Opts) ->
|
|
|
|
|
auth_request -> encode_msg_auth_request(id(Msg, TrUserData), TrUserData);
|
|
|
|
|
auth_reply -> encode_msg_auth_reply(id(Msg, TrUserData), TrUserData);
|
|
|
|
|
pub -> encode_msg_pub(id(Msg, TrUserData), TrUserData);
|
|
|
|
|
deploy -> encode_msg_deploy(id(Msg, TrUserData), TrUserData);
|
|
|
|
|
command -> encode_msg_command(id(Msg, TrUserData), TrUserData);
|
|
|
|
|
rpc_deploy -> encode_msg_rpc_deploy(id(Msg, TrUserData), TrUserData);
|
|
|
|
|
rpc_start_container -> encode_msg_rpc_start_container(id(Msg, TrUserData), TrUserData);
|
|
|
|
|
rpc_stop_container -> encode_msg_rpc_stop_container(id(Msg, TrUserData), TrUserData);
|
|
|
|
|
rpc_config_container -> encode_msg_rpc_config_container(id(Msg, TrUserData), TrUserData);
|
|
|
|
|
fetch_task_log -> encode_msg_fetch_task_log(id(Msg, TrUserData), TrUserData);
|
|
|
|
|
container_config -> encode_msg_container_config(id(Msg, TrUserData), TrUserData);
|
|
|
|
|
data -> encode_msg_data(id(Msg, TrUserData), TrUserData);
|
|
|
|
|
@ -217,10 +229,68 @@ encode_msg_pub(#pub{topic = F1, content = F2}, Bin, TrUserData) ->
|
|
|
|
|
end
|
|
|
|
|
end.
|
|
|
|
|
|
|
|
|
|
encode_msg_deploy(Msg, TrUserData) -> encode_msg_deploy(Msg, <<>>, TrUserData).
|
|
|
|
|
encode_msg_command(Msg, TrUserData) -> encode_msg_command(Msg, <<>>, TrUserData).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
encode_msg_deploy(#deploy{task_id = F1, config = F2}, Bin, TrUserData) ->
|
|
|
|
|
encode_msg_command(#command{command_type = F1, command = F2}, Bin, TrUserData) ->
|
|
|
|
|
B1 = if F1 == undefined -> Bin;
|
|
|
|
|
true ->
|
|
|
|
|
begin
|
|
|
|
|
TrF1 = id(F1, TrUserData),
|
|
|
|
|
case is_empty_string(TrF1) of
|
|
|
|
|
true -> Bin;
|
|
|
|
|
false -> e_type_string(TrF1, <<Bin/binary, 10>>, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
if F2 == undefined -> B1;
|
|
|
|
|
true ->
|
|
|
|
|
begin
|
|
|
|
|
TrF2 = id(F2, TrUserData),
|
|
|
|
|
case iolist_size(TrF2) of
|
|
|
|
|
0 -> B1;
|
|
|
|
|
_ -> e_type_bytes(TrF2, <<B1/binary, 18>>, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end.
|
|
|
|
|
|
|
|
|
|
encode_msg_rpc_deploy(Msg, TrUserData) -> encode_msg_rpc_deploy(Msg, <<>>, TrUserData).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
encode_msg_rpc_deploy(#rpc_deploy{packet_id = F1, task_id = F2, config = F3}, Bin, TrUserData) ->
|
|
|
|
|
B1 = if F1 == undefined -> Bin;
|
|
|
|
|
true ->
|
|
|
|
|
begin
|
|
|
|
|
TrF1 = id(F1, TrUserData),
|
|
|
|
|
if TrF1 =:= 0 -> Bin;
|
|
|
|
|
true -> e_varint(TrF1, <<Bin/binary, 8>>, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
B2 = if F2 == undefined -> B1;
|
|
|
|
|
true ->
|
|
|
|
|
begin
|
|
|
|
|
TrF2 = id(F2, TrUserData),
|
|
|
|
|
if TrF2 =:= 0 -> B1;
|
|
|
|
|
true -> e_varint(TrF2, <<B1/binary, 16>>, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
if F3 == undefined -> B2;
|
|
|
|
|
true ->
|
|
|
|
|
begin
|
|
|
|
|
TrF3 = id(F3, TrUserData),
|
|
|
|
|
case is_empty_string(TrF3) of
|
|
|
|
|
true -> B2;
|
|
|
|
|
false -> e_type_string(TrF3, <<B2/binary, 26>>, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end.
|
|
|
|
|
|
|
|
|
|
encode_msg_rpc_start_container(Msg, TrUserData) -> encode_msg_rpc_start_container(Msg, <<>>, TrUserData).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
encode_msg_rpc_start_container(#rpc_start_container{packet_id = F1, container_name = F2}, Bin, TrUserData) ->
|
|
|
|
|
B1 = if F1 == undefined -> Bin;
|
|
|
|
|
true ->
|
|
|
|
|
begin
|
|
|
|
|
@ -241,6 +311,64 @@ encode_msg_deploy(#deploy{task_id = F1, config = F2}, Bin, TrUserData) ->
|
|
|
|
|
end
|
|
|
|
|
end.
|
|
|
|
|
|
|
|
|
|
encode_msg_rpc_stop_container(Msg, TrUserData) -> encode_msg_rpc_stop_container(Msg, <<>>, TrUserData).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
encode_msg_rpc_stop_container(#rpc_stop_container{packet_id = F1, container_name = F2}, Bin, TrUserData) ->
|
|
|
|
|
B1 = if F1 == undefined -> Bin;
|
|
|
|
|
true ->
|
|
|
|
|
begin
|
|
|
|
|
TrF1 = id(F1, TrUserData),
|
|
|
|
|
if TrF1 =:= 0 -> Bin;
|
|
|
|
|
true -> e_varint(TrF1, <<Bin/binary, 8>>, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
if F2 == undefined -> B1;
|
|
|
|
|
true ->
|
|
|
|
|
begin
|
|
|
|
|
TrF2 = id(F2, TrUserData),
|
|
|
|
|
case is_empty_string(TrF2) of
|
|
|
|
|
true -> B1;
|
|
|
|
|
false -> e_type_string(TrF2, <<B1/binary, 18>>, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end.
|
|
|
|
|
|
|
|
|
|
encode_msg_rpc_config_container(Msg, TrUserData) -> encode_msg_rpc_config_container(Msg, <<>>, TrUserData).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
encode_msg_rpc_config_container(#rpc_config_container{packet_id = F1, container_name = F2, config = F3}, Bin, TrUserData) ->
|
|
|
|
|
B1 = if F1 == undefined -> Bin;
|
|
|
|
|
true ->
|
|
|
|
|
begin
|
|
|
|
|
TrF1 = id(F1, TrUserData),
|
|
|
|
|
if TrF1 =:= 0 -> Bin;
|
|
|
|
|
true -> e_varint(TrF1, <<Bin/binary, 8>>, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
B2 = if F2 == undefined -> B1;
|
|
|
|
|
true ->
|
|
|
|
|
begin
|
|
|
|
|
TrF2 = id(F2, TrUserData),
|
|
|
|
|
case is_empty_string(TrF2) of
|
|
|
|
|
true -> B1;
|
|
|
|
|
false -> e_type_string(TrF2, <<B1/binary, 18>>, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
if F3 == undefined -> B2;
|
|
|
|
|
true ->
|
|
|
|
|
begin
|
|
|
|
|
TrF3 = id(F3, TrUserData),
|
|
|
|
|
case iolist_size(TrF3) of
|
|
|
|
|
0 -> B2;
|
|
|
|
|
_ -> e_type_bytes(TrF3, <<B2/binary, 26>>, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end.
|
|
|
|
|
|
|
|
|
|
encode_msg_fetch_task_log(Msg, TrUserData) -> encode_msg_fetch_task_log(Msg, <<>>, TrUserData).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -649,7 +777,11 @@ decode_msg_1_catch(Bin, MsgName, TrUserData) ->
|
|
|
|
|
decode_msg_2_doit(auth_request, Bin, TrUserData) -> id(decode_msg_auth_request(Bin, TrUserData), TrUserData);
|
|
|
|
|
decode_msg_2_doit(auth_reply, Bin, TrUserData) -> id(decode_msg_auth_reply(Bin, TrUserData), TrUserData);
|
|
|
|
|
decode_msg_2_doit(pub, Bin, TrUserData) -> id(decode_msg_pub(Bin, TrUserData), TrUserData);
|
|
|
|
|
decode_msg_2_doit(deploy, Bin, TrUserData) -> id(decode_msg_deploy(Bin, TrUserData), TrUserData);
|
|
|
|
|
decode_msg_2_doit(command, Bin, TrUserData) -> id(decode_msg_command(Bin, TrUserData), TrUserData);
|
|
|
|
|
decode_msg_2_doit(rpc_deploy, Bin, TrUserData) -> id(decode_msg_rpc_deploy(Bin, TrUserData), TrUserData);
|
|
|
|
|
decode_msg_2_doit(rpc_start_container, Bin, TrUserData) -> id(decode_msg_rpc_start_container(Bin, TrUserData), TrUserData);
|
|
|
|
|
decode_msg_2_doit(rpc_stop_container, Bin, TrUserData) -> id(decode_msg_rpc_stop_container(Bin, TrUserData), TrUserData);
|
|
|
|
|
decode_msg_2_doit(rpc_config_container, Bin, TrUserData) -> id(decode_msg_rpc_config_container(Bin, TrUserData), TrUserData);
|
|
|
|
|
decode_msg_2_doit(fetch_task_log, Bin, TrUserData) -> id(decode_msg_fetch_task_log(Bin, TrUserData), TrUserData);
|
|
|
|
|
decode_msg_2_doit(container_config, Bin, TrUserData) -> id(decode_msg_container_config(Bin, TrUserData), TrUserData);
|
|
|
|
|
decode_msg_2_doit(data, Bin, TrUserData) -> id(decode_msg_data(Bin, TrUserData), TrUserData);
|
|
|
|
|
@ -832,56 +964,274 @@ skip_32_pub(<<_:32, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_rea
|
|
|
|
|
|
|
|
|
|
skip_64_pub(<<_:64, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_pub(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
decode_msg_deploy(Bin, TrUserData) -> dfp_read_field_def_deploy(Bin, 0, 0, 0, id(0, TrUserData), id(<<>>, TrUserData), TrUserData).
|
|
|
|
|
decode_msg_command(Bin, TrUserData) -> dfp_read_field_def_command(Bin, 0, 0, 0, id(<<>>, TrUserData), id(<<>>, TrUserData), TrUserData).
|
|
|
|
|
|
|
|
|
|
dfp_read_field_def_deploy(<<8, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> d_field_deploy_task_id(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
dfp_read_field_def_deploy(<<18, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> d_field_deploy_config(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
dfp_read_field_def_deploy(<<>>, 0, 0, _, F@_1, F@_2, _) -> #deploy{task_id = F@_1, config = F@_2};
|
|
|
|
|
dfp_read_field_def_deploy(Other, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dg_read_field_def_deploy(Other, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
dfp_read_field_def_command(<<10, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> d_field_command_command_type(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
dfp_read_field_def_command(<<18, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> d_field_command_command(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
dfp_read_field_def_command(<<>>, 0, 0, _, F@_1, F@_2, _) -> #command{command_type = F@_1, command = F@_2};
|
|
|
|
|
dfp_read_field_def_command(Other, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dg_read_field_def_command(Other, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
dg_read_field_def_deploy(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 32 - 7 -> dg_read_field_def_deploy(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
dg_read_field_def_deploy(<<0:1, X:7, Rest/binary>>, N, Acc, _, F@_1, F@_2, TrUserData) ->
|
|
|
|
|
dg_read_field_def_command(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 32 - 7 -> dg_read_field_def_command(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
dg_read_field_def_command(<<0:1, X:7, Rest/binary>>, N, Acc, _, F@_1, F@_2, TrUserData) ->
|
|
|
|
|
Key = X bsl N + Acc,
|
|
|
|
|
case Key of
|
|
|
|
|
8 -> d_field_deploy_task_id(Rest, 0, 0, 0, F@_1, F@_2, TrUserData);
|
|
|
|
|
18 -> d_field_deploy_config(Rest, 0, 0, 0, F@_1, F@_2, TrUserData);
|
|
|
|
|
10 -> d_field_command_command_type(Rest, 0, 0, 0, F@_1, F@_2, TrUserData);
|
|
|
|
|
18 -> d_field_command_command(Rest, 0, 0, 0, F@_1, F@_2, TrUserData);
|
|
|
|
|
_ ->
|
|
|
|
|
case Key band 7 of
|
|
|
|
|
0 -> skip_varint_deploy(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
1 -> skip_64_deploy(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
2 -> skip_length_delimited_deploy(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
3 -> skip_group_deploy(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
5 -> skip_32_deploy(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData)
|
|
|
|
|
0 -> skip_varint_command(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
1 -> skip_64_command(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
2 -> skip_length_delimited_command(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
3 -> skip_group_command(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
5 -> skip_32_command(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end;
|
|
|
|
|
dg_read_field_def_deploy(<<>>, 0, 0, _, F@_1, F@_2, _) -> #deploy{task_id = F@_1, config = F@_2}.
|
|
|
|
|
dg_read_field_def_command(<<>>, 0, 0, _, F@_1, F@_2, _) -> #command{command_type = F@_1, command = F@_2}.
|
|
|
|
|
|
|
|
|
|
d_field_deploy_task_id(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 57 -> d_field_deploy_task_id(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
d_field_deploy_task_id(<<0:1, X:7, Rest/binary>>, N, Acc, F, _, F@_2, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = {id((X bsl N + Acc) band 4294967295, TrUserData), Rest},
|
|
|
|
|
dfp_read_field_def_deploy(RestF, 0, 0, F, NewFValue, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
d_field_deploy_config(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 57 -> d_field_deploy_config(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
d_field_deploy_config(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, _, TrUserData) ->
|
|
|
|
|
d_field_command_command_type(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 57 -> d_field_command_command_type(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
d_field_command_command_type(<<0:1, X:7, Rest/binary>>, N, Acc, F, _, F@_2, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = begin Len = X bsl N + Acc, <<Bytes:Len/binary, Rest2/binary>> = Rest, Bytes2 = binary:copy(Bytes), {id(Bytes2, TrUserData), Rest2} end,
|
|
|
|
|
dfp_read_field_def_deploy(RestF, 0, 0, F, F@_1, NewFValue, TrUserData).
|
|
|
|
|
dfp_read_field_def_command(RestF, 0, 0, F, NewFValue, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_varint_deploy(<<1:1, _:7, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> skip_varint_deploy(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
skip_varint_deploy(<<0:1, _:7, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_deploy(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
d_field_command_command(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 57 -> d_field_command_command(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
d_field_command_command(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, _, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = begin Len = X bsl N + Acc, <<Bytes:Len/binary, Rest2/binary>> = Rest, Bytes2 = binary:copy(Bytes), {id(Bytes2, TrUserData), Rest2} end,
|
|
|
|
|
dfp_read_field_def_command(RestF, 0, 0, F, F@_1, NewFValue, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_length_delimited_deploy(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 57 -> skip_length_delimited_deploy(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
skip_length_delimited_deploy(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) ->
|
|
|
|
|
skip_varint_command(<<1:1, _:7, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> skip_varint_command(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
skip_varint_command(<<0:1, _:7, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_command(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_length_delimited_command(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 57 -> skip_length_delimited_command(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
skip_length_delimited_command(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) ->
|
|
|
|
|
Length = X bsl N + Acc,
|
|
|
|
|
<<_:Length/binary, Rest2/binary>> = Rest,
|
|
|
|
|
dfp_read_field_def_deploy(Rest2, 0, 0, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
dfp_read_field_def_command(Rest2, 0, 0, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_group_deploy(Bin, _, Z2, FNum, F@_1, F@_2, TrUserData) ->
|
|
|
|
|
skip_group_command(Bin, _, Z2, FNum, F@_1, F@_2, TrUserData) ->
|
|
|
|
|
{_, Rest} = read_group(Bin, FNum),
|
|
|
|
|
dfp_read_field_def_deploy(Rest, 0, Z2, FNum, F@_1, F@_2, TrUserData).
|
|
|
|
|
dfp_read_field_def_command(Rest, 0, Z2, FNum, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_32_deploy(<<_:32, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_deploy(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
skip_32_command(<<_:32, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_command(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_64_deploy(<<_:64, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_deploy(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
skip_64_command(<<_:64, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_command(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
decode_msg_rpc_deploy(Bin, TrUserData) -> dfp_read_field_def_rpc_deploy(Bin, 0, 0, 0, id(0, TrUserData), id(0, TrUserData), id(<<>>, TrUserData), TrUserData).
|
|
|
|
|
|
|
|
|
|
dfp_read_field_def_rpc_deploy(<<8, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> d_field_rpc_deploy_packet_id(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
dfp_read_field_def_rpc_deploy(<<16, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> d_field_rpc_deploy_task_id(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
dfp_read_field_def_rpc_deploy(<<26, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> d_field_rpc_deploy_config(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
dfp_read_field_def_rpc_deploy(<<>>, 0, 0, _, F@_1, F@_2, F@_3, _) -> #rpc_deploy{packet_id = F@_1, task_id = F@_2, config = F@_3};
|
|
|
|
|
dfp_read_field_def_rpc_deploy(Other, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> dg_read_field_def_rpc_deploy(Other, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
dg_read_field_def_rpc_deploy(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, F@_3, TrUserData) when N < 32 - 7 -> dg_read_field_def_rpc_deploy(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
dg_read_field_def_rpc_deploy(<<0:1, X:7, Rest/binary>>, N, Acc, _, F@_1, F@_2, F@_3, TrUserData) ->
|
|
|
|
|
Key = X bsl N + Acc,
|
|
|
|
|
case Key of
|
|
|
|
|
8 -> d_field_rpc_deploy_packet_id(Rest, 0, 0, 0, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
16 -> d_field_rpc_deploy_task_id(Rest, 0, 0, 0, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
26 -> d_field_rpc_deploy_config(Rest, 0, 0, 0, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
_ ->
|
|
|
|
|
case Key band 7 of
|
|
|
|
|
0 -> skip_varint_rpc_deploy(Rest, 0, 0, Key bsr 3, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
1 -> skip_64_rpc_deploy(Rest, 0, 0, Key bsr 3, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
2 -> skip_length_delimited_rpc_deploy(Rest, 0, 0, Key bsr 3, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
3 -> skip_group_rpc_deploy(Rest, 0, 0, Key bsr 3, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
5 -> skip_32_rpc_deploy(Rest, 0, 0, Key bsr 3, F@_1, F@_2, F@_3, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end;
|
|
|
|
|
dg_read_field_def_rpc_deploy(<<>>, 0, 0, _, F@_1, F@_2, F@_3, _) -> #rpc_deploy{packet_id = F@_1, task_id = F@_2, config = F@_3}.
|
|
|
|
|
|
|
|
|
|
d_field_rpc_deploy_packet_id(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, F@_3, TrUserData) when N < 57 -> d_field_rpc_deploy_packet_id(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
d_field_rpc_deploy_packet_id(<<0:1, X:7, Rest/binary>>, N, Acc, F, _, F@_2, F@_3, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = {id((X bsl N + Acc) band 4294967295, TrUserData), Rest},
|
|
|
|
|
dfp_read_field_def_rpc_deploy(RestF, 0, 0, F, NewFValue, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
d_field_rpc_deploy_task_id(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, F@_3, TrUserData) when N < 57 -> d_field_rpc_deploy_task_id(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
d_field_rpc_deploy_task_id(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, _, F@_3, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = {id((X bsl N + Acc) band 4294967295, TrUserData), Rest},
|
|
|
|
|
dfp_read_field_def_rpc_deploy(RestF, 0, 0, F, F@_1, NewFValue, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
d_field_rpc_deploy_config(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, F@_3, TrUserData) when N < 57 -> d_field_rpc_deploy_config(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
d_field_rpc_deploy_config(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, _, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = begin Len = X bsl N + Acc, <<Bytes:Len/binary, Rest2/binary>> = Rest, Bytes2 = binary:copy(Bytes), {id(Bytes2, TrUserData), Rest2} end,
|
|
|
|
|
dfp_read_field_def_rpc_deploy(RestF, 0, 0, F, F@_1, F@_2, NewFValue, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_varint_rpc_deploy(<<1:1, _:7, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> skip_varint_rpc_deploy(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
skip_varint_rpc_deploy(<<0:1, _:7, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> dfp_read_field_def_rpc_deploy(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_length_delimited_rpc_deploy(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, F@_3, TrUserData) when N < 57 -> skip_length_delimited_rpc_deploy(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
skip_length_delimited_rpc_deploy(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, F@_3, TrUserData) ->
|
|
|
|
|
Length = X bsl N + Acc,
|
|
|
|
|
<<_:Length/binary, Rest2/binary>> = Rest,
|
|
|
|
|
dfp_read_field_def_rpc_deploy(Rest2, 0, 0, F, F@_1, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_group_rpc_deploy(Bin, _, Z2, FNum, F@_1, F@_2, F@_3, TrUserData) ->
|
|
|
|
|
{_, Rest} = read_group(Bin, FNum),
|
|
|
|
|
dfp_read_field_def_rpc_deploy(Rest, 0, Z2, FNum, F@_1, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_32_rpc_deploy(<<_:32, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> dfp_read_field_def_rpc_deploy(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_64_rpc_deploy(<<_:64, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> dfp_read_field_def_rpc_deploy(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
decode_msg_rpc_start_container(Bin, TrUserData) -> dfp_read_field_def_rpc_start_container(Bin, 0, 0, 0, id(0, TrUserData), id(<<>>, TrUserData), TrUserData).
|
|
|
|
|
|
|
|
|
|
dfp_read_field_def_rpc_start_container(<<8, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> d_field_rpc_start_container_packet_id(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
dfp_read_field_def_rpc_start_container(<<18, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> d_field_rpc_start_container_container_name(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
dfp_read_field_def_rpc_start_container(<<>>, 0, 0, _, F@_1, F@_2, _) -> #rpc_start_container{packet_id = F@_1, container_name = F@_2};
|
|
|
|
|
dfp_read_field_def_rpc_start_container(Other, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dg_read_field_def_rpc_start_container(Other, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
dg_read_field_def_rpc_start_container(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 32 - 7 -> dg_read_field_def_rpc_start_container(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
dg_read_field_def_rpc_start_container(<<0:1, X:7, Rest/binary>>, N, Acc, _, F@_1, F@_2, TrUserData) ->
|
|
|
|
|
Key = X bsl N + Acc,
|
|
|
|
|
case Key of
|
|
|
|
|
8 -> d_field_rpc_start_container_packet_id(Rest, 0, 0, 0, F@_1, F@_2, TrUserData);
|
|
|
|
|
18 -> d_field_rpc_start_container_container_name(Rest, 0, 0, 0, F@_1, F@_2, TrUserData);
|
|
|
|
|
_ ->
|
|
|
|
|
case Key band 7 of
|
|
|
|
|
0 -> skip_varint_rpc_start_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
1 -> skip_64_rpc_start_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
2 -> skip_length_delimited_rpc_start_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
3 -> skip_group_rpc_start_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
5 -> skip_32_rpc_start_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end;
|
|
|
|
|
dg_read_field_def_rpc_start_container(<<>>, 0, 0, _, F@_1, F@_2, _) -> #rpc_start_container{packet_id = F@_1, container_name = F@_2}.
|
|
|
|
|
|
|
|
|
|
d_field_rpc_start_container_packet_id(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 57 -> d_field_rpc_start_container_packet_id(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
d_field_rpc_start_container_packet_id(<<0:1, X:7, Rest/binary>>, N, Acc, F, _, F@_2, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = {id((X bsl N + Acc) band 4294967295, TrUserData), Rest},
|
|
|
|
|
dfp_read_field_def_rpc_start_container(RestF, 0, 0, F, NewFValue, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
d_field_rpc_start_container_container_name(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 57 -> d_field_rpc_start_container_container_name(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
d_field_rpc_start_container_container_name(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, _, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = begin Len = X bsl N + Acc, <<Bytes:Len/binary, Rest2/binary>> = Rest, Bytes2 = binary:copy(Bytes), {id(Bytes2, TrUserData), Rest2} end,
|
|
|
|
|
dfp_read_field_def_rpc_start_container(RestF, 0, 0, F, F@_1, NewFValue, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_varint_rpc_start_container(<<1:1, _:7, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> skip_varint_rpc_start_container(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
skip_varint_rpc_start_container(<<0:1, _:7, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_rpc_start_container(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_length_delimited_rpc_start_container(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 57 -> skip_length_delimited_rpc_start_container(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
skip_length_delimited_rpc_start_container(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) ->
|
|
|
|
|
Length = X bsl N + Acc,
|
|
|
|
|
<<_:Length/binary, Rest2/binary>> = Rest,
|
|
|
|
|
dfp_read_field_def_rpc_start_container(Rest2, 0, 0, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_group_rpc_start_container(Bin, _, Z2, FNum, F@_1, F@_2, TrUserData) ->
|
|
|
|
|
{_, Rest} = read_group(Bin, FNum),
|
|
|
|
|
dfp_read_field_def_rpc_start_container(Rest, 0, Z2, FNum, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_32_rpc_start_container(<<_:32, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_rpc_start_container(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_64_rpc_start_container(<<_:64, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_rpc_start_container(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
decode_msg_rpc_stop_container(Bin, TrUserData) -> dfp_read_field_def_rpc_stop_container(Bin, 0, 0, 0, id(0, TrUserData), id(<<>>, TrUserData), TrUserData).
|
|
|
|
|
|
|
|
|
|
dfp_read_field_def_rpc_stop_container(<<8, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> d_field_rpc_stop_container_packet_id(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
dfp_read_field_def_rpc_stop_container(<<18, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> d_field_rpc_stop_container_container_name(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
dfp_read_field_def_rpc_stop_container(<<>>, 0, 0, _, F@_1, F@_2, _) -> #rpc_stop_container{packet_id = F@_1, container_name = F@_2};
|
|
|
|
|
dfp_read_field_def_rpc_stop_container(Other, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dg_read_field_def_rpc_stop_container(Other, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
dg_read_field_def_rpc_stop_container(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 32 - 7 -> dg_read_field_def_rpc_stop_container(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
dg_read_field_def_rpc_stop_container(<<0:1, X:7, Rest/binary>>, N, Acc, _, F@_1, F@_2, TrUserData) ->
|
|
|
|
|
Key = X bsl N + Acc,
|
|
|
|
|
case Key of
|
|
|
|
|
8 -> d_field_rpc_stop_container_packet_id(Rest, 0, 0, 0, F@_1, F@_2, TrUserData);
|
|
|
|
|
18 -> d_field_rpc_stop_container_container_name(Rest, 0, 0, 0, F@_1, F@_2, TrUserData);
|
|
|
|
|
_ ->
|
|
|
|
|
case Key band 7 of
|
|
|
|
|
0 -> skip_varint_rpc_stop_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
1 -> skip_64_rpc_stop_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
2 -> skip_length_delimited_rpc_stop_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
3 -> skip_group_rpc_stop_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData);
|
|
|
|
|
5 -> skip_32_rpc_stop_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end;
|
|
|
|
|
dg_read_field_def_rpc_stop_container(<<>>, 0, 0, _, F@_1, F@_2, _) -> #rpc_stop_container{packet_id = F@_1, container_name = F@_2}.
|
|
|
|
|
|
|
|
|
|
d_field_rpc_stop_container_packet_id(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 57 -> d_field_rpc_stop_container_packet_id(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
d_field_rpc_stop_container_packet_id(<<0:1, X:7, Rest/binary>>, N, Acc, F, _, F@_2, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = {id((X bsl N + Acc) band 4294967295, TrUserData), Rest},
|
|
|
|
|
dfp_read_field_def_rpc_stop_container(RestF, 0, 0, F, NewFValue, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
d_field_rpc_stop_container_container_name(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 57 -> d_field_rpc_stop_container_container_name(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
d_field_rpc_stop_container_container_name(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, _, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = begin Len = X bsl N + Acc, <<Bytes:Len/binary, Rest2/binary>> = Rest, Bytes2 = binary:copy(Bytes), {id(Bytes2, TrUserData), Rest2} end,
|
|
|
|
|
dfp_read_field_def_rpc_stop_container(RestF, 0, 0, F, F@_1, NewFValue, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_varint_rpc_stop_container(<<1:1, _:7, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> skip_varint_rpc_stop_container(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
skip_varint_rpc_stop_container(<<0:1, _:7, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_rpc_stop_container(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_length_delimited_rpc_stop_container(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) when N < 57 -> skip_length_delimited_rpc_stop_container(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, TrUserData);
|
|
|
|
|
skip_length_delimited_rpc_stop_container(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, TrUserData) ->
|
|
|
|
|
Length = X bsl N + Acc,
|
|
|
|
|
<<_:Length/binary, Rest2/binary>> = Rest,
|
|
|
|
|
dfp_read_field_def_rpc_stop_container(Rest2, 0, 0, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_group_rpc_stop_container(Bin, _, Z2, FNum, F@_1, F@_2, TrUserData) ->
|
|
|
|
|
{_, Rest} = read_group(Bin, FNum),
|
|
|
|
|
dfp_read_field_def_rpc_stop_container(Rest, 0, Z2, FNum, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_32_rpc_stop_container(<<_:32, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_rpc_stop_container(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_64_rpc_stop_container(<<_:64, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, TrUserData) -> dfp_read_field_def_rpc_stop_container(Rest, Z1, Z2, F, F@_1, F@_2, TrUserData).
|
|
|
|
|
|
|
|
|
|
decode_msg_rpc_config_container(Bin, TrUserData) -> dfp_read_field_def_rpc_config_container(Bin, 0, 0, 0, id(0, TrUserData), id(<<>>, TrUserData), id(<<>>, TrUserData), TrUserData).
|
|
|
|
|
|
|
|
|
|
dfp_read_field_def_rpc_config_container(<<8, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> d_field_rpc_config_container_packet_id(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
dfp_read_field_def_rpc_config_container(<<18, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> d_field_rpc_config_container_container_name(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
dfp_read_field_def_rpc_config_container(<<26, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> d_field_rpc_config_container_config(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
dfp_read_field_def_rpc_config_container(<<>>, 0, 0, _, F@_1, F@_2, F@_3, _) -> #rpc_config_container{packet_id = F@_1, container_name = F@_2, config = F@_3};
|
|
|
|
|
dfp_read_field_def_rpc_config_container(Other, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> dg_read_field_def_rpc_config_container(Other, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
dg_read_field_def_rpc_config_container(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, F@_3, TrUserData) when N < 32 - 7 -> dg_read_field_def_rpc_config_container(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
dg_read_field_def_rpc_config_container(<<0:1, X:7, Rest/binary>>, N, Acc, _, F@_1, F@_2, F@_3, TrUserData) ->
|
|
|
|
|
Key = X bsl N + Acc,
|
|
|
|
|
case Key of
|
|
|
|
|
8 -> d_field_rpc_config_container_packet_id(Rest, 0, 0, 0, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
18 -> d_field_rpc_config_container_container_name(Rest, 0, 0, 0, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
26 -> d_field_rpc_config_container_config(Rest, 0, 0, 0, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
_ ->
|
|
|
|
|
case Key band 7 of
|
|
|
|
|
0 -> skip_varint_rpc_config_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
1 -> skip_64_rpc_config_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
2 -> skip_length_delimited_rpc_config_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
3 -> skip_group_rpc_config_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
5 -> skip_32_rpc_config_container(Rest, 0, 0, Key bsr 3, F@_1, F@_2, F@_3, TrUserData)
|
|
|
|
|
end
|
|
|
|
|
end;
|
|
|
|
|
dg_read_field_def_rpc_config_container(<<>>, 0, 0, _, F@_1, F@_2, F@_3, _) -> #rpc_config_container{packet_id = F@_1, container_name = F@_2, config = F@_3}.
|
|
|
|
|
|
|
|
|
|
d_field_rpc_config_container_packet_id(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, F@_3, TrUserData) when N < 57 -> d_field_rpc_config_container_packet_id(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
d_field_rpc_config_container_packet_id(<<0:1, X:7, Rest/binary>>, N, Acc, F, _, F@_2, F@_3, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = {id((X bsl N + Acc) band 4294967295, TrUserData), Rest},
|
|
|
|
|
dfp_read_field_def_rpc_config_container(RestF, 0, 0, F, NewFValue, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
d_field_rpc_config_container_container_name(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, F@_3, TrUserData) when N < 57 -> d_field_rpc_config_container_container_name(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
d_field_rpc_config_container_container_name(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, _, F@_3, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = begin Len = X bsl N + Acc, <<Bytes:Len/binary, Rest2/binary>> = Rest, Bytes2 = binary:copy(Bytes), {id(Bytes2, TrUserData), Rest2} end,
|
|
|
|
|
dfp_read_field_def_rpc_config_container(RestF, 0, 0, F, F@_1, NewFValue, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
d_field_rpc_config_container_config(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, F@_3, TrUserData) when N < 57 -> d_field_rpc_config_container_config(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
d_field_rpc_config_container_config(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, _, TrUserData) ->
|
|
|
|
|
{NewFValue, RestF} = begin Len = X bsl N + Acc, <<Bytes:Len/binary, Rest2/binary>> = Rest, Bytes2 = binary:copy(Bytes), {id(Bytes2, TrUserData), Rest2} end,
|
|
|
|
|
dfp_read_field_def_rpc_config_container(RestF, 0, 0, F, F@_1, F@_2, NewFValue, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_varint_rpc_config_container(<<1:1, _:7, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> skip_varint_rpc_config_container(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
skip_varint_rpc_config_container(<<0:1, _:7, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> dfp_read_field_def_rpc_config_container(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_length_delimited_rpc_config_container(<<1:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, F@_3, TrUserData) when N < 57 -> skip_length_delimited_rpc_config_container(Rest, N + 7, X bsl N + Acc, F, F@_1, F@_2, F@_3, TrUserData);
|
|
|
|
|
skip_length_delimited_rpc_config_container(<<0:1, X:7, Rest/binary>>, N, Acc, F, F@_1, F@_2, F@_3, TrUserData) ->
|
|
|
|
|
Length = X bsl N + Acc,
|
|
|
|
|
<<_:Length/binary, Rest2/binary>> = Rest,
|
|
|
|
|
dfp_read_field_def_rpc_config_container(Rest2, 0, 0, F, F@_1, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_group_rpc_config_container(Bin, _, Z2, FNum, F@_1, F@_2, F@_3, TrUserData) ->
|
|
|
|
|
{_, Rest} = read_group(Bin, FNum),
|
|
|
|
|
dfp_read_field_def_rpc_config_container(Rest, 0, Z2, FNum, F@_1, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_32_rpc_config_container(<<_:32, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> dfp_read_field_def_rpc_config_container(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
skip_64_rpc_config_container(<<_:64, Rest/binary>>, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData) -> dfp_read_field_def_rpc_config_container(Rest, Z1, Z2, F, F@_1, F@_2, F@_3, TrUserData).
|
|
|
|
|
|
|
|
|
|
decode_msg_fetch_task_log(Bin, TrUserData) -> dfp_read_field_def_fetch_task_log(Bin, 0, 0, 0, id(0, TrUserData), TrUserData).
|
|
|
|
|
|
|
|
|
|
@ -1390,7 +1740,11 @@ merge_msgs(Prev, New, MsgName, Opts) ->
|
|
|
|
|
auth_request -> merge_msg_auth_request(Prev, New, TrUserData);
|
|
|
|
|
auth_reply -> merge_msg_auth_reply(Prev, New, TrUserData);
|
|
|
|
|
pub -> merge_msg_pub(Prev, New, TrUserData);
|
|
|
|
|
deploy -> merge_msg_deploy(Prev, New, TrUserData);
|
|
|
|
|
command -> merge_msg_command(Prev, New, TrUserData);
|
|
|
|
|
rpc_deploy -> merge_msg_rpc_deploy(Prev, New, TrUserData);
|
|
|
|
|
rpc_start_container -> merge_msg_rpc_start_container(Prev, New, TrUserData);
|
|
|
|
|
rpc_stop_container -> merge_msg_rpc_stop_container(Prev, New, TrUserData);
|
|
|
|
|
rpc_config_container -> merge_msg_rpc_config_container(Prev, New, TrUserData);
|
|
|
|
|
fetch_task_log -> merge_msg_fetch_task_log(Prev, New, TrUserData);
|
|
|
|
|
container_config -> merge_msg_container_config(Prev, New, TrUserData);
|
|
|
|
|
data -> merge_msg_data(Prev, New, TrUserData);
|
|
|
|
|
@ -1443,9 +1797,24 @@ merge_msg_pub(#pub{topic = PFtopic, content = PFcontent}, #pub{topic = NFtopic,
|
|
|
|
|
true -> NFcontent
|
|
|
|
|
end}.
|
|
|
|
|
|
|
|
|
|
-compile({nowarn_unused_function,merge_msg_deploy/3}).
|
|
|
|
|
merge_msg_deploy(#deploy{task_id = PFtask_id, config = PFconfig}, #deploy{task_id = NFtask_id, config = NFconfig}, _) ->
|
|
|
|
|
#deploy{task_id =
|
|
|
|
|
-compile({nowarn_unused_function,merge_msg_command/3}).
|
|
|
|
|
merge_msg_command(#command{command_type = PFcommand_type, command = PFcommand}, #command{command_type = NFcommand_type, command = NFcommand}, _) ->
|
|
|
|
|
#command{command_type =
|
|
|
|
|
if NFcommand_type =:= undefined -> PFcommand_type;
|
|
|
|
|
true -> NFcommand_type
|
|
|
|
|
end,
|
|
|
|
|
command =
|
|
|
|
|
if NFcommand =:= undefined -> PFcommand;
|
|
|
|
|
true -> NFcommand
|
|
|
|
|
end}.
|
|
|
|
|
|
|
|
|
|
-compile({nowarn_unused_function,merge_msg_rpc_deploy/3}).
|
|
|
|
|
merge_msg_rpc_deploy(#rpc_deploy{packet_id = PFpacket_id, task_id = PFtask_id, config = PFconfig}, #rpc_deploy{packet_id = NFpacket_id, task_id = NFtask_id, config = NFconfig}, _) ->
|
|
|
|
|
#rpc_deploy{packet_id =
|
|
|
|
|
if NFpacket_id =:= undefined -> PFpacket_id;
|
|
|
|
|
true -> NFpacket_id
|
|
|
|
|
end,
|
|
|
|
|
task_id =
|
|
|
|
|
if NFtask_id =:= undefined -> PFtask_id;
|
|
|
|
|
true -> NFtask_id
|
|
|
|
|
end,
|
|
|
|
|
@ -1454,6 +1823,43 @@ merge_msg_deploy(#deploy{task_id = PFtask_id, config = PFconfig}, #deploy{task_i
|
|
|
|
|
true -> NFconfig
|
|
|
|
|
end}.
|
|
|
|
|
|
|
|
|
|
-compile({nowarn_unused_function,merge_msg_rpc_start_container/3}).
|
|
|
|
|
merge_msg_rpc_start_container(#rpc_start_container{packet_id = PFpacket_id, container_name = PFcontainer_name}, #rpc_start_container{packet_id = NFpacket_id, container_name = NFcontainer_name}, _) ->
|
|
|
|
|
#rpc_start_container{packet_id =
|
|
|
|
|
if NFpacket_id =:= undefined -> PFpacket_id;
|
|
|
|
|
true -> NFpacket_id
|
|
|
|
|
end,
|
|
|
|
|
container_name =
|
|
|
|
|
if NFcontainer_name =:= undefined -> PFcontainer_name;
|
|
|
|
|
true -> NFcontainer_name
|
|
|
|
|
end}.
|
|
|
|
|
|
|
|
|
|
-compile({nowarn_unused_function,merge_msg_rpc_stop_container/3}).
|
|
|
|
|
merge_msg_rpc_stop_container(#rpc_stop_container{packet_id = PFpacket_id, container_name = PFcontainer_name}, #rpc_stop_container{packet_id = NFpacket_id, container_name = NFcontainer_name}, _) ->
|
|
|
|
|
#rpc_stop_container{packet_id =
|
|
|
|
|
if NFpacket_id =:= undefined -> PFpacket_id;
|
|
|
|
|
true -> NFpacket_id
|
|
|
|
|
end,
|
|
|
|
|
container_name =
|
|
|
|
|
if NFcontainer_name =:= undefined -> PFcontainer_name;
|
|
|
|
|
true -> NFcontainer_name
|
|
|
|
|
end}.
|
|
|
|
|
|
|
|
|
|
-compile({nowarn_unused_function,merge_msg_rpc_config_container/3}).
|
|
|
|
|
merge_msg_rpc_config_container(#rpc_config_container{packet_id = PFpacket_id, container_name = PFcontainer_name, config = PFconfig}, #rpc_config_container{packet_id = NFpacket_id, container_name = NFcontainer_name, config = NFconfig}, _) ->
|
|
|
|
|
#rpc_config_container{packet_id =
|
|
|
|
|
if NFpacket_id =:= undefined -> PFpacket_id;
|
|
|
|
|
true -> NFpacket_id
|
|
|
|
|
end,
|
|
|
|
|
container_name =
|
|
|
|
|
if NFcontainer_name =:= undefined -> PFcontainer_name;
|
|
|
|
|
true -> NFcontainer_name
|
|
|
|
|
end,
|
|
|
|
|
config =
|
|
|
|
|
if NFconfig =:= undefined -> PFconfig;
|
|
|
|
|
true -> NFconfig
|
|
|
|
|
end}.
|
|
|
|
|
|
|
|
|
|
-compile({nowarn_unused_function,merge_msg_fetch_task_log/3}).
|
|
|
|
|
merge_msg_fetch_task_log(#fetch_task_log{task_id = PFtask_id}, #fetch_task_log{task_id = NFtask_id}, _) ->
|
|
|
|
|
#fetch_task_log{task_id =
|
|
|
|
|
@ -1582,7 +1988,11 @@ verify_msg(Msg, MsgName, Opts) ->
|
|
|
|
|
auth_request -> v_msg_auth_request(Msg, [MsgName], TrUserData);
|
|
|
|
|
auth_reply -> v_msg_auth_reply(Msg, [MsgName], TrUserData);
|
|
|
|
|
pub -> v_msg_pub(Msg, [MsgName], TrUserData);
|
|
|
|
|
deploy -> v_msg_deploy(Msg, [MsgName], TrUserData);
|
|
|
|
|
command -> v_msg_command(Msg, [MsgName], TrUserData);
|
|
|
|
|
rpc_deploy -> v_msg_rpc_deploy(Msg, [MsgName], TrUserData);
|
|
|
|
|
rpc_start_container -> v_msg_rpc_start_container(Msg, [MsgName], TrUserData);
|
|
|
|
|
rpc_stop_container -> v_msg_rpc_stop_container(Msg, [MsgName], TrUserData);
|
|
|
|
|
rpc_config_container -> v_msg_rpc_config_container(Msg, [MsgName], TrUserData);
|
|
|
|
|
fetch_task_log -> v_msg_fetch_task_log(Msg, [MsgName], TrUserData);
|
|
|
|
|
container_config -> v_msg_container_config(Msg, [MsgName], TrUserData);
|
|
|
|
|
data -> v_msg_data(Msg, [MsgName], TrUserData);
|
|
|
|
|
@ -1637,17 +2047,71 @@ v_msg_pub(#pub{topic = F1, content = F2}, Path, TrUserData) ->
|
|
|
|
|
ok;
|
|
|
|
|
v_msg_pub(X, Path, _TrUserData) -> mk_type_error({expected_msg, pub}, X, Path).
|
|
|
|
|
|
|
|
|
|
-compile({nowarn_unused_function,v_msg_deploy/3}).
|
|
|
|
|
-dialyzer({nowarn_function,v_msg_deploy/3}).
|
|
|
|
|
v_msg_deploy(#deploy{task_id = F1, config = F2}, Path, TrUserData) ->
|
|
|
|
|
-compile({nowarn_unused_function,v_msg_command/3}).
|
|
|
|
|
-dialyzer({nowarn_function,v_msg_command/3}).
|
|
|
|
|
v_msg_command(#command{command_type = F1, command = F2}, Path, TrUserData) ->
|
|
|
|
|
if F1 == undefined -> ok;
|
|
|
|
|
true -> v_type_uint32(F1, [task_id | Path], TrUserData)
|
|
|
|
|
true -> v_type_string(F1, [command_type | Path], TrUserData)
|
|
|
|
|
end,
|
|
|
|
|
if F2 == undefined -> ok;
|
|
|
|
|
true -> v_type_string(F2, [config | Path], TrUserData)
|
|
|
|
|
true -> v_type_bytes(F2, [command | Path], TrUserData)
|
|
|
|
|
end,
|
|
|
|
|
ok;
|
|
|
|
|
v_msg_deploy(X, Path, _TrUserData) -> mk_type_error({expected_msg, deploy}, X, Path).
|
|
|
|
|
v_msg_command(X, Path, _TrUserData) -> mk_type_error({expected_msg, command}, X, Path).
|
|
|
|
|
|
|
|
|
|
-compile({nowarn_unused_function,v_msg_rpc_deploy/3}).
|
|
|
|
|
-dialyzer({nowarn_function,v_msg_rpc_deploy/3}).
|
|
|
|
|
v_msg_rpc_deploy(#rpc_deploy{packet_id = F1, task_id = F2, config = F3}, Path, TrUserData) ->
|
|
|
|
|
if F1 == undefined -> ok;
|
|
|
|
|
true -> v_type_uint32(F1, [packet_id | Path], TrUserData)
|
|
|
|
|
end,
|
|
|
|
|
if F2 == undefined -> ok;
|
|
|
|
|
true -> v_type_uint32(F2, [task_id | Path], TrUserData)
|
|
|
|
|
end,
|
|
|
|
|
if F3 == undefined -> ok;
|
|
|
|
|
true -> v_type_string(F3, [config | Path], TrUserData)
|
|
|
|
|
end,
|
|
|
|
|
ok;
|
|
|
|
|
v_msg_rpc_deploy(X, Path, _TrUserData) -> mk_type_error({expected_msg, rpc_deploy}, X, Path).
|
|
|
|
|
|
|
|
|
|
-compile({nowarn_unused_function,v_msg_rpc_start_container/3}).
|
|
|
|
|
-dialyzer({nowarn_function,v_msg_rpc_start_container/3}).
|
|
|
|
|
v_msg_rpc_start_container(#rpc_start_container{packet_id = F1, container_name = F2}, Path, TrUserData) ->
|
|
|
|
|
if F1 == undefined -> ok;
|
|
|
|
|
true -> v_type_uint32(F1, [packet_id | Path], TrUserData)
|
|
|
|
|
end,
|
|
|
|
|
if F2 == undefined -> ok;
|
|
|
|
|
true -> v_type_string(F2, [container_name | Path], TrUserData)
|
|
|
|
|
end,
|
|
|
|
|
ok;
|
|
|
|
|
v_msg_rpc_start_container(X, Path, _TrUserData) -> mk_type_error({expected_msg, rpc_start_container}, X, Path).
|
|
|
|
|
|
|
|
|
|
-compile({nowarn_unused_function,v_msg_rpc_stop_container/3}).
|
|
|
|
|
-dialyzer({nowarn_function,v_msg_rpc_stop_container/3}).
|
|
|
|
|
v_msg_rpc_stop_container(#rpc_stop_container{packet_id = F1, container_name = F2}, Path, TrUserData) ->
|
|
|
|
|
if F1 == undefined -> ok;
|
|
|
|
|
true -> v_type_uint32(F1, [packet_id | Path], TrUserData)
|
|
|
|
|
end,
|
|
|
|
|
if F2 == undefined -> ok;
|
|
|
|
|
true -> v_type_string(F2, [container_name | Path], TrUserData)
|
|
|
|
|
end,
|
|
|
|
|
ok;
|
|
|
|
|
v_msg_rpc_stop_container(X, Path, _TrUserData) -> mk_type_error({expected_msg, rpc_stop_container}, X, Path).
|
|
|
|
|
|
|
|
|
|
-compile({nowarn_unused_function,v_msg_rpc_config_container/3}).
|
|
|
|
|
-dialyzer({nowarn_function,v_msg_rpc_config_container/3}).
|
|
|
|
|
v_msg_rpc_config_container(#rpc_config_container{packet_id = F1, container_name = F2, config = F3}, Path, TrUserData) ->
|
|
|
|
|
if F1 == undefined -> ok;
|
|
|
|
|
true -> v_type_uint32(F1, [packet_id | Path], TrUserData)
|
|
|
|
|
end,
|
|
|
|
|
if F2 == undefined -> ok;
|
|
|
|
|
true -> v_type_string(F2, [container_name | Path], TrUserData)
|
|
|
|
|
end,
|
|
|
|
|
if F3 == undefined -> ok;
|
|
|
|
|
true -> v_type_bytes(F3, [config | Path], TrUserData)
|
|
|
|
|
end,
|
|
|
|
|
ok;
|
|
|
|
|
v_msg_rpc_config_container(X, Path, _TrUserData) -> mk_type_error({expected_msg, rpc_config_container}, X, Path).
|
|
|
|
|
|
|
|
|
|
-compile({nowarn_unused_function,v_msg_fetch_task_log/3}).
|
|
|
|
|
-dialyzer({nowarn_function,v_msg_fetch_task_log/3}).
|
|
|
|
|
@ -1838,7 +2302,17 @@ get_msg_defs() ->
|
|
|
|
|
#field{name = timestamp, fnum = 6, rnum = 6, type = uint32, occurrence = optional, opts = []}]},
|
|
|
|
|
{{msg, auth_reply}, [#field{name = code, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []}, #field{name = message, fnum = 2, rnum = 3, type = string, occurrence = optional, opts = []}]},
|
|
|
|
|
{{msg, pub}, [#field{name = topic, fnum = 1, rnum = 2, type = string, occurrence = optional, opts = []}, #field{name = content, fnum = 2, rnum = 3, type = bytes, occurrence = optional, opts = []}]},
|
|
|
|
|
{{msg, deploy}, [#field{name = task_id, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []}, #field{name = config, fnum = 2, rnum = 3, type = string, occurrence = optional, opts = []}]},
|
|
|
|
|
{{msg, command}, [#field{name = command_type, fnum = 1, rnum = 2, type = string, occurrence = optional, opts = []}, #field{name = command, fnum = 2, rnum = 3, type = bytes, occurrence = optional, opts = []}]},
|
|
|
|
|
{{msg, rpc_deploy},
|
|
|
|
|
[#field{name = packet_id, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []},
|
|
|
|
|
#field{name = task_id, fnum = 2, rnum = 3, type = uint32, occurrence = optional, opts = []},
|
|
|
|
|
#field{name = config, fnum = 3, rnum = 4, type = string, occurrence = optional, opts = []}]},
|
|
|
|
|
{{msg, rpc_start_container}, [#field{name = packet_id, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []}, #field{name = container_name, fnum = 2, rnum = 3, type = string, occurrence = optional, opts = []}]},
|
|
|
|
|
{{msg, rpc_stop_container}, [#field{name = packet_id, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []}, #field{name = container_name, fnum = 2, rnum = 3, type = string, occurrence = optional, opts = []}]},
|
|
|
|
|
{{msg, rpc_config_container},
|
|
|
|
|
[#field{name = packet_id, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []},
|
|
|
|
|
#field{name = container_name, fnum = 2, rnum = 3, type = string, occurrence = optional, opts = []},
|
|
|
|
|
#field{name = config, fnum = 3, rnum = 4, type = bytes, occurrence = optional, opts = []}]},
|
|
|
|
|
{{msg, fetch_task_log}, [#field{name = task_id, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []}]},
|
|
|
|
|
{{msg, container_config}, [#field{name = container_name, fnum = 1, rnum = 2, type = string, occurrence = optional, opts = []}, #field{name = config, fnum = 2, rnum = 3, type = bytes, occurrence = optional, opts = []}]},
|
|
|
|
|
{{msg, data},
|
|
|
|
|
@ -1866,13 +2340,13 @@ get_msg_defs() ->
|
|
|
|
|
#field{name = interfaces, fnum = 13, rnum = 14, type = string, occurrence = optional, opts = []}]}].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_msg_names() -> [auth_request, auth_reply, pub, deploy, fetch_task_log, container_config, data, event, ping].
|
|
|
|
|
get_msg_names() -> [auth_request, auth_reply, pub, command, rpc_deploy, rpc_start_container, rpc_stop_container, rpc_config_container, fetch_task_log, container_config, data, event, ping].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_group_names() -> [].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_msg_or_group_names() -> [auth_request, auth_reply, pub, deploy, fetch_task_log, container_config, data, event, ping].
|
|
|
|
|
get_msg_or_group_names() -> [auth_request, auth_reply, pub, command, rpc_deploy, rpc_start_container, rpc_stop_container, rpc_config_container, fetch_task_log, container_config, data, event, ping].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_enum_names() -> [].
|
|
|
|
|
@ -1897,7 +2371,17 @@ find_msg_def(auth_request) ->
|
|
|
|
|
#field{name = timestamp, fnum = 6, rnum = 6, type = uint32, occurrence = optional, opts = []}];
|
|
|
|
|
find_msg_def(auth_reply) -> [#field{name = code, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []}, #field{name = message, fnum = 2, rnum = 3, type = string, occurrence = optional, opts = []}];
|
|
|
|
|
find_msg_def(pub) -> [#field{name = topic, fnum = 1, rnum = 2, type = string, occurrence = optional, opts = []}, #field{name = content, fnum = 2, rnum = 3, type = bytes, occurrence = optional, opts = []}];
|
|
|
|
|
find_msg_def(deploy) -> [#field{name = task_id, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []}, #field{name = config, fnum = 2, rnum = 3, type = string, occurrence = optional, opts = []}];
|
|
|
|
|
find_msg_def(command) -> [#field{name = command_type, fnum = 1, rnum = 2, type = string, occurrence = optional, opts = []}, #field{name = command, fnum = 2, rnum = 3, type = bytes, occurrence = optional, opts = []}];
|
|
|
|
|
find_msg_def(rpc_deploy) ->
|
|
|
|
|
[#field{name = packet_id, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []},
|
|
|
|
|
#field{name = task_id, fnum = 2, rnum = 3, type = uint32, occurrence = optional, opts = []},
|
|
|
|
|
#field{name = config, fnum = 3, rnum = 4, type = string, occurrence = optional, opts = []}];
|
|
|
|
|
find_msg_def(rpc_start_container) -> [#field{name = packet_id, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []}, #field{name = container_name, fnum = 2, rnum = 3, type = string, occurrence = optional, opts = []}];
|
|
|
|
|
find_msg_def(rpc_stop_container) -> [#field{name = packet_id, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []}, #field{name = container_name, fnum = 2, rnum = 3, type = string, occurrence = optional, opts = []}];
|
|
|
|
|
find_msg_def(rpc_config_container) ->
|
|
|
|
|
[#field{name = packet_id, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []},
|
|
|
|
|
#field{name = container_name, fnum = 2, rnum = 3, type = string, occurrence = optional, opts = []},
|
|
|
|
|
#field{name = config, fnum = 3, rnum = 4, type = bytes, occurrence = optional, opts = []}];
|
|
|
|
|
find_msg_def(fetch_task_log) -> [#field{name = task_id, fnum = 1, rnum = 2, type = uint32, occurrence = optional, opts = []}];
|
|
|
|
|
find_msg_def(container_config) -> [#field{name = container_name, fnum = 1, rnum = 2, type = string, occurrence = optional, opts = []}, #field{name = config, fnum = 2, rnum = 3, type = bytes, occurrence = optional, opts = []}];
|
|
|
|
|
find_msg_def(data) ->
|
|
|
|
|
@ -1984,7 +2468,11 @@ service_and_rpc_name_to_fqbins(S, R) -> error({gpb_error, {badservice_or_rpc, {S
|
|
|
|
|
fqbin_to_msg_name(<<"AuthRequest">>) -> auth_request;
|
|
|
|
|
fqbin_to_msg_name(<<"AuthReply">>) -> auth_reply;
|
|
|
|
|
fqbin_to_msg_name(<<"Pub">>) -> pub;
|
|
|
|
|
fqbin_to_msg_name(<<"Deploy">>) -> deploy;
|
|
|
|
|
fqbin_to_msg_name(<<"Command">>) -> command;
|
|
|
|
|
fqbin_to_msg_name(<<"RPCDeploy">>) -> rpc_deploy;
|
|
|
|
|
fqbin_to_msg_name(<<"RPCStartContainer">>) -> rpc_start_container;
|
|
|
|
|
fqbin_to_msg_name(<<"RPCStopContainer">>) -> rpc_stop_container;
|
|
|
|
|
fqbin_to_msg_name(<<"RPCConfigContainer">>) -> rpc_config_container;
|
|
|
|
|
fqbin_to_msg_name(<<"FetchTaskLog">>) -> fetch_task_log;
|
|
|
|
|
fqbin_to_msg_name(<<"ContainerConfig">>) -> container_config;
|
|
|
|
|
fqbin_to_msg_name(<<"Data">>) -> data;
|
|
|
|
|
@ -1996,7 +2484,11 @@ fqbin_to_msg_name(E) -> error({gpb_error, {badmsg, E}}).
|
|
|
|
|
msg_name_to_fqbin(auth_request) -> <<"AuthRequest">>;
|
|
|
|
|
msg_name_to_fqbin(auth_reply) -> <<"AuthReply">>;
|
|
|
|
|
msg_name_to_fqbin(pub) -> <<"Pub">>;
|
|
|
|
|
msg_name_to_fqbin(deploy) -> <<"Deploy">>;
|
|
|
|
|
msg_name_to_fqbin(command) -> <<"Command">>;
|
|
|
|
|
msg_name_to_fqbin(rpc_deploy) -> <<"RPCDeploy">>;
|
|
|
|
|
msg_name_to_fqbin(rpc_start_container) -> <<"RPCStartContainer">>;
|
|
|
|
|
msg_name_to_fqbin(rpc_stop_container) -> <<"RPCStopContainer">>;
|
|
|
|
|
msg_name_to_fqbin(rpc_config_container) -> <<"RPCConfigContainer">>;
|
|
|
|
|
msg_name_to_fqbin(fetch_task_log) -> <<"FetchTaskLog">>;
|
|
|
|
|
msg_name_to_fqbin(container_config) -> <<"ContainerConfig">>;
|
|
|
|
|
msg_name_to_fqbin(data) -> <<"Data">>;
|
|
|
|
|
@ -2040,7 +2532,7 @@ get_all_source_basenames() -> ["message_pb.proto"].
|
|
|
|
|
get_all_proto_names() -> ["message_pb"].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_msg_containment("message_pb") -> [auth_reply, auth_request, container_config, data, deploy, event, fetch_task_log, ping, pub];
|
|
|
|
|
get_msg_containment("message_pb") -> [auth_reply, auth_request, command, container_config, data, event, fetch_task_log, ping, pub, rpc_config_container, rpc_deploy, rpc_start_container, rpc_stop_container];
|
|
|
|
|
get_msg_containment(P) -> error({gpb_error, {badproto, P}}).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2061,13 +2553,17 @@ get_enum_containment(P) -> error({gpb_error, {badproto, P}}).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"Data">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"RPCStopContainer">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"RPCStartContainer">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"RPCConfigContainer">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"Pub">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"Event">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"Command">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"AuthRequest">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"Ping">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"FetchTaskLog">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"ContainerConfig">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"Deploy">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"RPCDeploy">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(<<"AuthReply">>) -> "message_pb";
|
|
|
|
|
get_proto_by_msg_name_as_fqbin(E) -> error({gpb_error, {badmsg, E}}).
|
|
|
|
|
|
|
|
|
|
|