text: # -*- coding: utf-8 -*-
  import os
  import sys
  
  
  import cmdb_sdk.utils.http_util
  import google.protobuf.json_format
  
  
  class HistoryClient(object):
      def __init__(self, server_ip="", server_port=0, service_name="", host=""):
          """
          初始化client
          :param server_ip: 指定sdk请求的server_ip，为空时走名字服务路由
          :param server_port: 指定sdk请求的server_port，与server_ip一起使用, 为空时走名字服务路由
          :param service_name: 指定sdk请求的service_name, 为空时按契约名称路由。如果server_ip和service_name同时设置，server_ip优先级更高
          :param host: 指定sdk请求服务的host名称, 如cmdb.easyops-only.com
          """
          if server_ip == "" and server_port != 0 or server_ip != "" and server_port == 0:
              raise Exception("server_ip和server_port必须同时指定")
          self._server_ip = server_ip
          self._server_port = server_port
          self._service_name = service_name
          self._host = host
  
      
  