本文整理匯總了Python中thrift.Thrift.TMessageType.CALL屬性的典型用法代碼示例。如果您正苦於以下問題:Python TMessageType.CALL屬性的具體用法?Python TMessageType.CALL怎麽用?Python TMessageType.CALL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類thrift.Thrift.TMessageType
的用法示例。
在下文中一共展示了TMessageType.CALL屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: process
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def process(self, iprot, oprot):
(name, type, seqid) = iprot.readMessageBegin();
if type != TMessageType.CALL & type != TMessageType.ONEWAY:
raise TException("TMultiplex protocol only supports CALL & ONEWAY")
index = name.find(TMultiplexedProtocol.SEPARATOR)
if index < 0:
raise TException("Service name not found in message name: " + name + ". Did you forget to use TMultiplexProtocol in your client?")
serviceName = name[0:index]
call = name[index+len(TMultiplexedProtocol.SEPARATOR):]
if not serviceName in self.services:
raise TException("Service name not found: " + serviceName + ". Did you forget to call registerProcessor()?")
standardMessage = (
call,
type,
seqid
)
return self.services[serviceName].process(StoredMessageProtocol(iprot, standardMessage), oprot)
示例2: send_createCredential
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_createCredential(self, xiaomiAppId, appUserAuthProvider, authToken):
self._oprot.writeMessageBegin('createCredential', TMessageType.CALL, self._seqid)
args = createCredential_args()
args.xiaomiAppId = xiaomiAppId
args.appUserAuthProvider = appUserAuthProvider
args.authToken = authToken
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例3: send_getServerVersion
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_getServerVersion(self):
self._oprot.writeMessageBegin('getServerVersion', TMessageType.CALL, self._seqid)
args = getServerVersion_args()
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例4: send_validateClientVersion
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_validateClientVersion(self, clientVersion):
self._oprot.writeMessageBegin('validateClientVersion', TMessageType.CALL, self._seqid)
args = validateClientVersion_args()
args.clientVersion = clientVersion
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例5: send_getServerTime
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_getServerTime(self):
self._oprot.writeMessageBegin('getServerTime', TMessageType.CALL, self._seqid)
args = getServerTime_args()
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例6: send_ping
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_ping(self):
self._oprot.writeMessageBegin('ping', TMessageType.CALL, self._seqid)
args = ping_args()
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例7: send_startService
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_startService(self, request):
self._oprot.writeMessageBegin('startService', TMessageType.CALL, self._seqid)
args = startService_args()
args.request = request
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例8: send_stopService
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_stopService(self, request):
self._oprot.writeMessageBegin('stopService', TMessageType.CALL, self._seqid)
args = stopService_args()
args.request = request
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例9: send_queryClusterState
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_queryClusterState(self, cluster):
self._oprot.writeMessageBegin('queryClusterState', TMessageType.CALL, self._seqid)
args = queryClusterState_args()
args.cluster = cluster
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例10: send_createCluster
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_createCluster(self, cluster):
self._oprot.writeMessageBegin('createCluster', TMessageType.CALL, self._seqid)
args = createCluster_args()
args.cluster = cluster
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例11: send_addInstanceGroup
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_addInstanceGroup(self, instanceGroup):
self._oprot.writeMessageBegin('addInstanceGroup', TMessageType.CALL, self._seqid)
args = addInstanceGroup_args()
args.instanceGroup = instanceGroup
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例12: send_submitJob
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_submitJob(self, job):
self._oprot.writeMessageBegin('submitJob', TMessageType.CALL, self._seqid)
args = submitJob_args()
args.job = job
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例13: send_submitJobs
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_submitJobs(self, jobs):
self._oprot.writeMessageBegin('submitJobs', TMessageType.CALL, self._seqid)
args = submitJobs_args()
args.jobs = jobs
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例14: send_terminateCluster
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_terminateCluster(self, terminateCluster):
self._oprot.writeMessageBegin('terminateCluster', TMessageType.CALL, self._seqid)
args = terminateCluster_args()
args.terminateCluster = terminateCluster
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
示例15: send_modifyInstanceGroup
# 需要導入模塊: from thrift.Thrift import TMessageType [as 別名]
# 或者: from thrift.Thrift.TMessageType import CALL [as 別名]
def send_modifyInstanceGroup(self, instanceGroup):
self._oprot.writeMessageBegin('modifyInstanceGroup', TMessageType.CALL, self._seqid)
args = modifyInstanceGroup_args()
args.instanceGroup = instanceGroup
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()