# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from tradeTools import indexData_pb2 as indexData__pb2


class indexDataStub(object):
  """The greeting service definition.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.sayHello = channel.unary_unary(
        '/indexData.indexData/sayHello',
        request_serializer=indexData__pb2.JSONRequest.SerializeToString,
        response_deserializer=indexData__pb2.JSONResponse.FromString,
        )
    self.getSymbols = channel.unary_unary(
        '/indexData.indexData/getSymbols',
        request_serializer=indexData__pb2.JSONRequest.SerializeToString,
        response_deserializer=indexData__pb2.Symbols.FromString,
        )


class indexDataServicer(object):
  """The greeting service definition.
  """

  def sayHello(self, request, context):
    """Sends a greeting
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def getSymbols(self, request, context):
    """获取开仓信号
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_indexDataServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'sayHello': grpc.unary_unary_rpc_method_handler(
          servicer.sayHello,
          request_deserializer=indexData__pb2.JSONRequest.FromString,
          response_serializer=indexData__pb2.JSONResponse.SerializeToString,
      ),
      'getSymbols': grpc.unary_unary_rpc_method_handler(
          servicer.getSymbols,
          request_deserializer=indexData__pb2.JSONRequest.FromString,
          response_serializer=indexData__pb2.Symbols.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'indexData.indexData', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
