diff options
author | Alejandro Rodríguez <alejorro70@gmail.com> | 2017-12-14 22:39:13 +0300 |
---|---|---|
committer | Alejandro Rodríguez <alejorro70@gmail.com> | 2017-12-15 23:01:59 +0300 |
commit | 20c7b633e22206e6e3b871d6acde671215500f06 (patch) | |
tree | b4cfae67b5ad42c8608ca17520cd676f4afdaef5 /internal/rubyserver | |
parent | bbaf8a4c52ee2d92c834ed68e0f9c4317ba7d891 (diff) |
Incorporate RemoteService
Diffstat (limited to 'internal/rubyserver')
-rw-r--r-- | internal/rubyserver/rubyserver.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/rubyserver/rubyserver.go b/internal/rubyserver/rubyserver.go index 4970185b3..e2930bab0 100644 --- a/internal/rubyserver/rubyserver.go +++ b/internal/rubyserver/rubyserver.go @@ -186,6 +186,14 @@ func (s *Server) ConflictsServiceClient(ctx context.Context) (pb.ConflictsServic return pb.NewConflictsServiceClient(conn), err } +// RemoteServiceClient returns a RemoteServiceClient instance that is +// configured to connect to the running Ruby server. This assumes Start() +// has been called already. +func (s *Server) RemoteServiceClient(ctx context.Context) (pb.RemoteServiceClient, error) { + conn, err := s.getConnection(ctx) + return pb.NewRemoteServiceClient(conn), err +} + func (s *Server) getConnection(ctx context.Context) (*grpc.ClientConn, error) { s.clientConnMu.RLock() conn := s.clientConn |