mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 23:14:58 +00:00
29 lines
738 B
Python
29 lines
738 B
Python
#-*- coding: utf-8 -*-
|
|
|
|
# apploader_test.py
|
|
# WelsonJS app loader over gRPC protocol (gRPC proto 3) - Client
|
|
# https://github.com/gnh1201/welsonjs
|
|
|
|
from __future__ import print_function
|
|
|
|
import os
|
|
import sys
|
|
sys.path.insert(0, os.path.dirname(__file__))
|
|
|
|
from concurrent import futures
|
|
import logging
|
|
|
|
import grpc
|
|
import WelsonAppLoader_pb2
|
|
import WelsonAppLoader_pb2_grpc
|
|
|
|
def run():
|
|
with grpc.insecure_channel("localhost:50051") as channel:
|
|
stub = WelsonAppLoader_pb2_grpc.WelsonAppLoaderStub(channel)
|
|
response = stub.Run(WelsonAppLoader_pb2.AppRequest(appName="testloader"))
|
|
print("Response: " + response.responseText)
|
|
|
|
if __name__ == "__main__":
|
|
logging.basicConfig()
|
|
run()
|