Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for Issue 1 and Issue 3 #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Oct 27, 2017

  1. Issue 1: Add ability to specify protocol buffer messages as records

    Module which deals with records needs to be given as input to unary RPC call. This can be presented as a tuple to the Options list that is passed to grpc_client:unary().
    
    {msgs_as_records,ModuleName}.
    
    And user is expeced to generate records based header file using gpb. This can be out of the scope of grpc_client API.
    
    For example for our route_guide example:
    
    Point = #'Point'{
        latitude = 409146138,
        longitude = -746188906
    },
    Return = route_guide_client:'GetFeature'(Connection, Point, [{msgs_as_records,route_guide_pb}]).
    
    API Return will also include a record:
    
    {ok,#{grpc_status => 0,
          headers => #{<<":status">> => <<"200">>},
          http_status => 200,
          result =>
              {'Feature',<<"Berkshire Valley Management Area Trail, Jefferson, NJ, USA">>,
                         {'Point',409146138,-746188906}},
          status_message => <<>>,
          trailers => #{<<"grpc-status">> => <<"0">>}}}
    vasu-dasari committed Oct 27, 2017
    Configuration menu
    Copy the full SHA
    619c6f8 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2017

  1. Issue 3: Add support to deliver messages asynchronously

    Details of this request in "Issue 3".
    
     With this code, user can create a streaming RPC connection by specifying how messages have to be deliverd.
    
     {ok, Stream} = grpc_client:new_stream(Connection, 'RouteGuide', 'RouteChat', route_guide, [{async_notification, self()}]).
    
     And when a notification arrives on the stream, a message of the following form {notification,Response} will be delivered to the calling process.
    vasu-dasari committed Nov 26, 2017
    Configuration menu
    Copy the full SHA
    61ad2ea View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2017

  1. Configuration menu
    Copy the full SHA
    49c653e View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2018

  1. Update function specs

    Specs to reflect message to be of type tuple (records) or map
    vasu-dasari committed Jun 13, 2018
    Configuration menu
    Copy the full SHA
    f7b89e0 View commit details
    Browse the repository at this point in the history
  2. Update grpc notification

    As per code review comment, update notification sent to registered clients as {grpc_notification,Response}
    vasu-dasari committed Jun 13, 2018
    Configuration menu
    Copy the full SHA
    9303841 View commit details
    Browse the repository at this point in the history