Nacos引擎Python客户端接入文档 查询实例列表 NacosClient.listnaminginstance(servicename, clusters, namespaceid, groupname, healthyonly) param servicename required Service name to query. param clusters Cluster names separated by comma. param namespaceid Customized group name, default blank. param groupname Customized group name , default DEFAULTGROUP. param healthyonly A bool value for querying healthy instances or not. return Instance info list if success or an exception will be raised. 查询实例详情 NacosClient.getnaminginstance(servicename, ip, port, clustername) param servicename required Service name. param ip required IP of the instance. param port required Port of the instance. param clustername Cluster name. return Instance info if success or an exception will be raised. 发送实例心跳 NacosClient.sendheartbeat(servicename, ip, port, clustername, weight, metadata) param servicename required Service name. param ip required IP of the instance. param port required Port of the instance. param clustername Cluster to register to. param weight A float number for load balancing weight. param ephemeral A bool value to determine whether instance is ephemeral or not. param metadata Extra info in JSON string format or dict format. return A JSON object include server recommended beat interval if success or an exception will be raised. 订阅服务实例变化 NacosClient.subscribe(listenerfn, listenerinterval7, args, kwargs) param listenerfn required Customized listener function. param listenerinterval Listen interval , default 7 second. param servicename required Service name which subscribes. param clusters Cluster names separated by comma. param namespaceid Customized group name, default blank. param groupname Customized group name , default DEFAULTGROUP. param healthyonly A bool value for querying healthy instances or not.