def _create_gateway_service_stub(self): gateway_api_pb2_grpc = self.gateway_api_pb2_grpc apigw = apigw_fmt.format(tier=self.tier) return \ gateway_api_pb2_grpc.GatewayServiceStub( grpc.insecure_channel('{}:9953'.format(apigw)))
def _create_gateway_service_stub(self): gateway_api_pb2_grpc = self.gateway_api_pb2_grpc if ".unstable" in self.tier: siac_name = self.tier.split('.')[0] apigw = apigw_siac_fmt.format(siac_name=siac_name) else: apigw = apigw_fmt.format(tier=self.tier) return \ gateway_api_pb2_grpc.GatewayServiceStub( grpc.insecure_channel('{}:9953'.format(apigw)))
def _create_gateway_service_stub(self): gateway_api_pb2_grpc = self.gateway_api_pb2_grpc if ".unstable" in self.tier: siac_name = self.tier.split('.')[0] apigw = apigw_siac_fmt.format(siac_name=siac_name) channel = grpc.insecure_channel('{}:9953'.format(apigw)) else: apigw = apigw_fmt.format(tier=self.tier) port = 443 channel_credentials = grpc.ssl_channel_credentials( None, None, None) channel = grpc.secure_channel('{}:{}'.format(apigw, port), channel_credentials) return \ gateway_api_pb2_grpc.GatewayServiceStub(channel)