Packages

An etcd client built on top of gun and egrpc.

Current section

Files

Jump to
etcdgun src clients etcdgun_etcdserverpb_watch_client.erl
Raw

src/clients/etcdgun_etcdserverpb_watch_client.erl

%%
%% @doc This module is auto-generated by rebar3_egrpc_plugin.
%%
%% This module was generated on 2025-06-22T06:36:36+00:00 and should not be modified manually
%% @end
-module(etcdgun_etcdserverpb_watch_client).
-ignore_xref(etcdgun_etcdserverpb_watch_client).
-export([watch/1, watch/2]).
-define(GRPC_SERVICE_NAME, 'etcdserverpb.Watch').
%% @doc Call the bidi_streaming RPC method `Watch' of service `etcdserverpb.Watch'.
-spec watch(egrpc:channel()) -> Result when
Result :: egrpc_stub:bidi_streaming_ret().
watch(Channel) ->
watch(Channel, #{}).
-spec watch(egrpc:channel(), Opts) -> Result when
Result :: egrpc_stub:bidi_streaming_ret(),
Opts :: egrpc_stub:opts().
watch(Channel, Opts) ->
RpcDef = etcdgun_rpc_pb:find_rpc_def(?GRPC_SERVICE_NAME, 'Watch'),
Grpc = #{
rpc_def => RpcDef,
path => <<"/etcdserverpb.Watch/Watch">>,
pb_module => etcdgun_rpc_pb,
service_name => ?GRPC_SERVICE_NAME
},
egrpc_stub:bidi_streaming(Channel, Grpc, Opts).