diff options
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 |