merged latest from develop

This commit is contained in:
Blake Harnden 2020-01-14 22:19:49 -08:00
commit dafd5dff9f
6 changed files with 42 additions and 14 deletions

View file

@ -141,7 +141,7 @@ class CoreGrpcClient:
Provides convenience methods for interfacing with the CORE grpc server.
"""
def __init__(self, address: str = "localhost:50051") -> None:
def __init__(self, address: str = "localhost:50051", proxy: bool = False) -> None:
"""
Creates a CoreGrpcClient instance.
@ -150,6 +150,7 @@ class CoreGrpcClient:
self.address = address
self.stub = None
self.channel = None
self.proxy = proxy
def start_session(
self,
@ -1130,7 +1131,9 @@ class CoreGrpcClient:
:return: nothing
"""
self.channel = grpc.insecure_channel(self.address)
self.channel = grpc.insecure_channel(
self.address, options=[("grpc.enable_http_proxy", self.proxy)]
)
self.stub = core_pb2_grpc.CoreApiStub(self.channel)
def close(self) -> None: