随笔分类 -  总结

摘要:// 打包 tar -cvf xxx.tar.gz xxx/ --exclude=xxx // 拷贝 cp -r xxx/* xxx/ 阅读全文
posted @ 2023-02-21 19:24 S&L·chuck 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-02-10 15:54 S&L·chuck 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-02-07 21:55 S&L·chuck 阅读(20) 评论(0) 推荐(0) 编辑
摘要:背景介绍 最近在做一个采购商城搜索的功能,核心功能是 根据用户录入的关键字在商品库中根据全称匹配进行检索得到结果 方案比较 目标 在 不超过 100万 的数据集合中,根据用户录入的 关键字 和 条件 检索到结果 方案 全部数据量不大,最直接的想法 SQL like 查询,示例如下 select * 阅读全文
posted @ 2023-02-01 16:45 S&L·chuck 阅读(38) 评论(0) 推荐(0) 编辑
摘要:分布式锁学习与总结 背景 在系统中进行数据修改时,一般都需要先读取数据,然后进行修改保存,在并发场景下,如果对数据的准确性要求比较严格,对数据的修改和保存要进行原子性操作,避免出现数据丢失和失效的情况。传统的单服务系统我们常用本地锁来避免并发带来的问题,然而,当服务采用微服务集群方式部署时,本地锁无 阅读全文
posted @ 2023-01-23 23:16 S&L·chuck 阅读(53) 评论(0) 推荐(0) 编辑
摘要:raft 中文翻译 选举过程 跟随者一个心跳周期没有收到心跳,触发选举,但是为了选举安全性,和领导者失联的时间必须超过一个心跳周期开始 状态变化 跟随者 > 候选者 > 领导者 处理交互请求,例如 追加日志,选举投票等 // processRPC is called to handle an inc 阅读全文
posted @ 2021-05-18 17:29 S&L·chuck 阅读(185) 评论(0) 推荐(0) 编辑
摘要:go-kit/kit 基本功能 auth -- 校验 circuitbreaker -- 熔断 endpoint -- 服务 log -- 日志 metrics -- 监控 ratelimit -- 限流 sd -- 服务发现 tracing -- 跟踪 transport -- 请求 auth / 阅读全文
posted @ 2021-03-08 14:43 S&L·chuck 阅读(145) 评论(0) 推荐(0) 编辑
摘要:CSS 入门学习 目录 CSS 简介 CSS 内容 CSS 编写 CSS 应用 CSS 简介 层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。CSS不仅可以静态地修饰 阅读全文
posted @ 2021-01-28 15:53 S&L·chuck 阅读(93) 评论(0) 推荐(0) 编辑
摘要:fx fx 为 uber 提供的一个 控制反转和自动化装配的golang语言的解决方案 demo 示例 示例: package main import ( "context" "log" "net/http" "os" "time" "go.uber.org/fx" ) // NewLogger c 阅读全文
posted @ 2021-01-23 15:44 S&L·chuck 阅读(268) 评论(0) 推荐(0) 编辑
摘要:zap zap 是 uber 提供的 一个高性能的组件库 结构 一条结构化的日志大致包含5个过程: 分配日志 Entry: 创建整个结构体,此时虽然没有传参(fields)进来,但是 fields 参数其实创建了 检查级别,添加core: 如果 logger 同时配置了 hook,则 hook 会在 阅读全文
posted @ 2021-01-08 17:26 S&L·chuck 阅读(306) 评论(0) 推荐(0) 编辑
摘要:2020 总结 读书 32 本 博客 36篇 学习 源码阅读 算法导论 腾讯云认证 阅读全文
posted @ 2020-12-31 15:38 S&L·chuck 阅读(43) 评论(0) 推荐(0) 编辑
摘要:下载 设置 symbol 设置 源代码 常用命令 cpu 过高 !runaway命令,查看线程使用CPU时间情况 执行~ 命令,进入到线程 执行!clrstack命令查看当前线程堆栈变量值的信息 !dso命令可以查看堆栈上的所有对象详细信息 内存 检测 !eeheap -gc !dumpheap – 阅读全文
posted @ 2020-12-23 14:33 S&L·chuck 阅读(76) 评论(0) 推荐(0) 编辑
摘要:websocket 协议了解 https://www.cnblogs.com/chyingp/p/websocket-deep-in.html 源代码 var addr = flag.String("addr", "localhost:8080", "http service address") v 阅读全文
posted @ 2020-12-03 18:00 S&L·chuck 阅读(267) 评论(0) 推荐(0) 编辑
摘要:oxy 作用 限流 负载 代理 Oxy is a Go library with HTTP handlers that enhance HTTP standard library: Buffer retries and buffers requests and responses Stream pa 阅读全文
posted @ 2020-12-03 14:33 S&L·chuck 阅读(140) 评论(0) 推荐(0) 编辑
摘要:postcss workflow PostCSS parses CSS to the tree of nodes (we call it AST). This tree may content: Root: node of the top of the tree, which represent C 阅读全文
posted @ 2020-11-26 12:02 S&L·chuck 阅读(196) 评论(0) 推荐(0) 编辑
摘要:参考 https://www.cnblogs.com/lpfuture/p/5796398.html https://www.cnblogs.com/gnuhpc/archive/2012/01/13/2321476.html 阅读全文
posted @ 2020-11-24 12:29 S&L·chuck 阅读(72) 评论(0) 推荐(0) 编辑
摘要:leveldb 使用 // The returned DB instance is safe for concurrent use. Which mean that all // DB's methods may be called concurrently from multiple gorout 阅读全文
posted @ 2020-11-18 20:19 S&L·chuck 阅读(171) 评论(0) 推荐(0) 编辑
摘要:logrus 实现多个实例 func New() *Logger { return &Logger{ Out: os.Stderr, Formatter: new(TextFormatter), Hooks: make(LevelHooks), Level: InfoLevel, ExitFunc: 阅读全文
posted @ 2020-11-16 17:21 S&L·chuck 阅读(134) 评论(0) 推荐(0) 编辑
摘要:viper Functional options 在 c# 等语言中,一般多个参数这么实现 funcion add(){ } funcion add(int a){ } funcion add(int a,int b){ } 在 golang 中,由于没有重载,在实现多个参数是会比较麻烦,可能的实现 阅读全文
posted @ 2020-11-13 16:21 S&L·chuck 阅读(294) 评论(0) 推荐(0) 编辑
摘要:redigo 接口 Conn type Conn interface { // Close closes the connection. Close() error // Err returns a non-nil value when the connection is not usable. E 阅读全文
posted @ 2020-11-12 16:23 S&L·chuck 阅读(472) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示