File: command_line_pb2_grpc.py

package info (click to toggle)
golang-github-grpc-ecosystem-grpc-opentracing 0.0~git20180507.8e809c8-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 592 kB
  • sloc: python: 2,021; java: 1,077; makefile: 2
file content (42 lines) | stat: -rw-r--r-- 1,363 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities

import command_line_pb2 as command__line__pb2


class CommandLineStub(object):

  def __init__(self, channel):
    """Constructor.

    Args:
      channel: A grpc.Channel.
    """
    self.Echo = channel.unary_unary(
        '/command_line.CommandLine/Echo',
        request_serializer=command__line__pb2.CommandRequest.SerializeToString,
        response_deserializer=command__line__pb2.CommandResponse.FromString,
        )


class CommandLineServicer(object):

  def Echo(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_CommandLineServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Echo': grpc.unary_unary_rpc_method_handler(
          servicer.Echo,
          request_deserializer=command__line__pb2.CommandRequest.FromString,
          response_serializer=command__line__pb2.CommandResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'command_line.CommandLine', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))