seata-server-0.9.0.tar.gz


因在github下载seat太慢,上传tar包资源,供大家学习分布式事务,项目版本是0.9.0,用于ubuntu的安装使用,有问题可以私信!!!
资源截图
代码片段和文件信息
#!/usr/bin/env python3
#  -*- coding: UTF-8 -*-

import http.client
import sys

if len(sys.argv) != 2:
    print (‘python nacos-config.py nacosIp‘)
    exit()

headers = {
    ‘content-type‘: “application/x-www-form-urlencoded“
}

hasError = False
for line in open(‘nacos-config.txt‘):
    pair = line.split(‘=‘)
    if len(pair) < 2:
        continue
    print (line)
    url_prefix = sys.argv[1] + ‘:8848‘
    conn = http.client.HTTPConnection(url_prefix)
    url_postfix = ‘/nacos/v1/cs/configs?dataId={}&group=SEATA_GROUP&content={}‘.format(str(pair[0])str(line[line.index(‘=‘)+1:])).strip()
    conn.request(“POST“ url_postfix headers=headers)
    res = conn.getresponse()
    data = res.read()
    if data.decode(“utf-8“) != “true“:
        hasError = True
if hasError:
    print (“init nacos config fail.“)
else:
    print (“init nacos config finished please start seata-server.“)

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)