示例#1
0
    def Export(self, request, context):
        context.set_code(StatusCode.UNAVAILABLE)

        context.send_initial_metadata(
            (("google.rpc.retryinfo-bin", RetryInfo().SerializeToString()), ))
        context.set_trailing_metadata(((
            "google.rpc.retryinfo-bin",
            RetryInfo(retry_delay=Duration(seconds=4)).SerializeToString(),
        ), ))

        return ExportLogsServiceResponse()
示例#2
0
    def Export(self, request, context):
        context.set_code(StatusCode.ALREADY_EXISTS)

        return ExportLogsServiceResponse()
示例#3
0
    def Export(self, request, context):
        context.set_code(StatusCode.UNAVAILABLE)

        return ExportLogsServiceResponse()