in client/Apache.ShenYu.Client/Utils/Zookeeper/ZookeeperClient.cs [188:204]
public async Task<string> CreateOrUpdateAsync(string path, byte[] data, List<ACL> acls, CreateMode createMode)
{
path = GetZooKeeperPath(path);
return await RetryUntilConnected(async () =>
{
var existsResult = await _zookeeperClient.existsAsync(path, false) != null;
if (existsResult)
{
await _zookeeperClient.setDataAsync(path, data);
}
else
{
path = await _zookeeperClient.createAsync(path, data, acls, createMode);
}
return path;
});
}