start to move etcd logic to registry pkg