无状态服务, stateless service

无状态服务, stateless service https://blog.csdn.net/xiangxizhishi/article/details/79434749 一、定义 无状态服务(stateless service)对单次请求的处理,不依赖其他请求,也就是说,处理一次请求所需的全部信

`— title: Ansible author: “-” date: 2015-10-14T07:14:28+00:00 url: Ansible categories: inbox tags: reprint Ansible https://linuxtoy.org/archives/hands-on-with-ansible.html 最近纠结于在 Puppet、Chef、SaltStack、Ansible 等一干配置管理工具中如何选择。考虑到一旦

分组 首先我们来了解下分组的概念。所谓分组,就是将一个数据包分成一个个更小的数据包。例如对于一个10GB的数据包,总不可以一次性发送过去吧,而

apisix

“apisix” 启动etcd apisix podman run -d \ --name apisix \ -v apisix-logs:/usr/local/apisix/logs \ -v apisix-conf:/usr/local/apisix/conf \ -v /etc/letsencrypt/live/wiloon.com-0001:/usr/local/apisix/cert \ -p 9180:9180 \ -p 9080:9080 \ -p 443:9443 \ apache/apisix allow admin allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow - 192.168.50.116/24 # If we don’t set any IP list, then any IP access is allowed by default. 修改etcd 地址 etcd: host: - "http://192.168.50.101:2379" test

coupling relationship, 耦合关系

coupling relationship, 耦合关系 耦合 不同模块之间的关系就是耦合,根据耦合程度可以分为 7 种,耦合度依次变低。 内容耦合 公共耦合 外部耦合 控制耦合 标记耦合 数据耦合, Data Coupling

dependency-library-service, 依赖 库, 服务

dependency-library-service, 依赖 库, 服务 依赖管理: 究竟该用库还是服务? https://www.zybuluo.com/sambodhi/note/642554 http://blog.jessitron.com/2017/01/dependencies.html 依赖管理:究竟该用库还是服务? 当一个系统变得越来越复杂的时候,它必然大量的依赖外部系统和内部

embedded basic

“embedded basic” MCU 微控制单元MCU (Microcontroller Unit) 又叫单片机、微处理器,是集成电路的一种。MCU类似于CPU,是可以执行嵌入式程序的一种集成电路。 MCU执行的程序叫

equipment, device

“equipment, device” equipment “Equipment” 通常指 “成套的,不只一件的设备”。而且,与 “device” 和 “appliance” 不同的是,“equipment” 不光

etcd

“etcd” etcd etcd是CoreOS团队于2013年6月发起的开源项目,它的目标是构建一个高可用的分布式键值(key-value)数据库。etcd内部

etcd basic

“etcd basic” 单节点的etcd podman run -d \ -p 2379:2379 \ -v etcd-data:/etcd-data \ --add-host=localhost:127.0.0.1 \ -e ETCD_DATA_DIR="/etcd-data" \ -e ETCD_ENABLE_V2="true" \ -e ALLOW_NONE_AUTHENTICATION="yes" \ -e ETCD_ADVERTISE_CLIENT_URLS="http://0.0.0.0:2379" \ -e ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379" \ --name etcd bitnami/etcd:latest set, get etcdctl ls etcdctl set /testdir/testkey "foo" etcdctl get /testdir/testkey etcdctl update /testdir/testkey "Hello" etcdctl rm /testdir/testkey etcdctl mk /testdir/testkey "Hello world" etcdctl mkdir testdir2 https://etcd.io/docs/v3.4.0/op-guide/container/ https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/container.md

flutter

“flutter” install 1 2 3 yay -S flutter flutter doctor https://flutter.dev/docs/get-started/install/linux https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_2.0.5-stable.tar.xz export export FLUTTER_STORAGE_BASE_URL="https://mirrors.tuna.tsinghua.edu.cn/flutter” export PUB_HOSTED_URL="https://mirrors.tuna.tsinghua.edu.cn/dart-pub”

futex

“futex” futex (fast userspace mutex) 是Linux的一个基础构件,可以用来构建各种更高级别的同步机制,比如锁或者信号量等等,POSIX信号量就是基于futex构建的。大

github action

“github action” Deploy to vm - name: Deploy to vm uses: easingthemes/ssh-deploy@v2.1.2 env: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} ARGS: "-avz --delete" SOURCE: "public/" REMOTE_HOST: "192.168.0.xxx" REMOTE_PORT: 38785 REMOTE_USER: "blog" TARGET: "/home/blog/public/" secrets.SSH_PRIVATE_KEY 粘贴私钥时后面加一个换行,否则会报错,invalid format

golang sync.Map

“golang sync.Map” 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 func main() { m := sync.Map{} m.Store(1,1) go do(m) go do(m) time.Sleep(1*time.Second) fmt.Println(m.Load(1)) } func do (m sync.Map) { i := 0 for i < 10000 { m.Store(1,1) i++ } } 清空 sync.Map https://stackoverflow.com/questions/49355345/how-to-clean-a-sync-map 1 2 //erase map: A zero sync.Map is empty and ready for use. map2 = sync.Map{}

golang 正则

“golang 正则” https://studygolang.com/articles/7256 func main() { fmt.Println(regexp.Match("H.* ", []byte("Hello World!"))) // true }

http method, get, head, post, options, put, delte, trace, connect

“http method, get, head, post, options, put, delete, trace, connect” https://www.cnblogs.com/machao/p/5788425.html HTTP Method 的历史: HTTP 0.9 这个版本只有 GET 方法 HTTP 1.0 这个版本有 GET HEAD POST 这三个方法 HTTP 1.1 这个版本是当前版本,包含 GET HEAD POST OPTIONS PUT DELETE TRACE CONNECT 这 8 个方法

hugo, envoy, github actions

“hugo, envoy, github actions” install 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 sudo pacman -S hugo hugo new site quickstart cd quickstart git init git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke echo theme = \"ananke\" >> config.toml hugo new posts/my-first-post.md hugo server -D hugo new site wiloon.com cd wiloon.com git init git clone https://github.com/olOwOlo/hugo-theme-even themes/even cp themes/even/exampleSite/config.toml config.toml hugo new post/my-first-post.md

icebox

“icebox” 先用adb安装 谷歌版冰箱激活 Root方法: 把冰箱apk放到 /data/local/tmp/ 文件夹中,然后为方便起见重命名为icebox.apk 然后打开终端,su后输入 pm