上一页 1 2 3 4 5 6 7 ··· 34 下一页
摘要: 问题: cannot use cli (type *"go.etcd.io/etcd/clientv3".Client) as type *"github.com/coreos/etcd/clientv3".Client in argument to concurrency.NewSession 解 阅读全文
posted @ 2022-01-14 17:06 pythoner_wl 阅读(82) 评论(0) 推荐(0) 编辑
摘要: undefined: resolver.BuildOption 在用clientv3连接etcd时。 C:\Users\anmut\go\pkg\mod\github.com\coreos\etcd@v3.3.22+incompatible\clientv3\balancer\resolver\en 阅读全文
posted @ 2022-01-14 11:58 pythoner_wl 阅读(116) 评论(0) 推荐(0) 编辑
摘要: etcd 数据库 etcd是使用Go语言开发的一个开源的、高可用、强一致的分布式key-value存储系统,可以用于配置共享和服务的注册和发现。 类似项目有zookeeper和consul。 etcd具有以下特点: 完全复制:集群中的每个节点都可以使用完整的存档 高可用性:Etcd可用于避免硬件的单 阅读全文
posted @ 2022-01-13 16:50 pythoner_wl 阅读(436) 评论(0) 推荐(0) 编辑
摘要: ubuntu 安装 docker # 使用国内 daocloud 一键安装命令 curl -sSL https://get.daocloud.io/docker | sh # apt install sudo apt install docker.io # 查看版本 w1@ubuntu:~$ doc 阅读全文
posted @ 2022-01-13 15:09 pythoner_wl 阅读(492) 评论(0) 推荐(0) 编辑
摘要: ssh: connect to host 10.228.23.144 port 22: Connection refused 没有安装 ssh server # 安装 ssh server sudo apt-get install openssh-server # 安装完成后,我们再用ps -e|g 阅读全文
posted @ 2022-01-13 14:47 pythoner_wl 阅读(504) 评论(0) 推荐(0) 编辑
摘要: 当网络编辑适配器选择 VMnet0 桥接为主机的网络后,发现虚拟机还是不能上网:无线网络换成不需要密码的网络。它就好了,惊了。 虚拟机有网络发现 ssh 不能远程连接,安装 ssh server,关闭防火墙或开放指定端口。 阅读全文
posted @ 2022-01-13 14:46 pythoner_wl 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 二十一、类元编程 (元类)是深奥的知识,99% 的用户都无需关注。如果你想知道是否需要使用元类,我告诉你,不需要(真正需要使用元类的人确信他们需要,无需解释原因)。 ​ ——Tim Peters ​ Timsort 算法的发明者,活跃的 Python 贡献者 类元编程是指在运行时创建或定制类的技艺。 阅读全文
posted @ 2022-01-12 17:52 pythoner_wl 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 二十、属性描述符 实现了 __get__、__set__ 或 __delete__ 方法的类是描述符。 描述符的用法是,创建一个实例,作为另一个类的类属性。 描述符类:实现描述符协议的类。 托管类:把描述符实例类属性的类。 描述符实例:描述符类的各个实例,声明为托管类的类属性。 In [22]: c 阅读全文
posted @ 2022-01-12 17:50 pythoner_wl 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 十九、动态属性和特性 在 python 中,数据的属性和处理数据的方法统称属性(attribute)。方法只是可调用的属性。 除了这二者之外,我们还可以创建特性(property),在不改变类接口的前提下,使用存取方法(即读值方法和设值方法)修改数据属性。 这与统一访问原则相符:不管服务是有存储还是 阅读全文
posted @ 2022-01-12 17:49 pythoner_wl 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 十八、使用 asyncio 包处理并发 asyncio包:使用事件循环驱动的协程实现并发。 线程与协程的对比 '\ thinking' 旋转等待效果 In [1]: import threading In [2]: import itertools In [3]: import time,sys I 阅读全文
posted @ 2022-01-12 17:48 pythoner_wl 阅读(86) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 34 下一页