コード例 #1
0
ファイル: test_agent.py プロジェクト: raphaelvrosa/gym
    async def call_info(self, stub):
        request = gym_pb2.Info()
        request.uuid = "0"
        request.role = "manager"
        request.address = "0.0.0.0:50061"

        reply = await stub.Greet(request)
        reply_dict = json_format.MessageToDict(reply)

        return reply_dict
コード例 #2
0
ファイル: test_manager.py プロジェクト: raphaelvrosa/gym
    async def call_info(self, stub):
        request = gym_pb2.Info()
        request.uuid = "0"
        request.role = "player"
        request.address = "0.0.0.0:50061"
        contacts = ["agent/127.0.0.1:50051", "monitor/127.0.0.1:50052"]
        for contact in contacts:
            request.contacts.append(contact)

        reply = await stub.Greet(request)
        reply_dict = json_format.MessageToDict(reply)

        return reply_dict