摘要: 这是个有意思的提问在官方的github issues 附上地址 https://github.com/redis/redis/issues/757 提问时间是2012年 9年了 老炒饭了 其实上面意思就是说了为了安全传输什么的 但是你以为真的就天真了 最新官方文档 真相大白 附上链接 https:/ 阅读全文
posted @ 2022-05-17 22:52 vx_guanchaoguo0 阅读(183) 评论(0) 推荐(0)
摘要: 在排行榜中实现分数和时间排序 分数相同则按照时间排序 需求分析 redis中zset的long为int64 转为十进制是19位 时间戳10位 毫秒时间戳13位 高位存分数7位 十进制 7位 8字节中拆分 最高位不可用 还剩43位 高22位存分数 低41位存时间戳 golang 代码 package 阅读全文
posted @ 2022-05-17 22:22 vx_guanchaoguo0 阅读(633) 评论(0) 推荐(0)
摘要: 一般场景是重试几次后失败 package main import ( "fmt" "time" ) func main() { retry(func() bool { return false }, []int{1, 3, 5}) } func retry(f func() bool, interv 阅读全文
posted @ 2022-05-13 10:17 vx_guanchaoguo0 阅读(396) 评论(0) 推荐(0)
摘要: ps process status 进程状态 ps -ef e/A 显示全部进程 f 显示进程关系 top 运行与前面峰值较高的部分 阅读全文
posted @ 2022-05-13 10:14 vx_guanchaoguo0 阅读(37) 评论(0) 推荐(0)
摘要: 强制终止某个进程 taskkill /im 指定进程名称 /F 强制结束 终止nginx taskkill /im nginx.exe /F 阅读全文
posted @ 2022-05-13 10:08 vx_guanchaoguo0 阅读(99) 评论(0) 推荐(0)
摘要: win10 后台运行 user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; # 是否设置后台运行默认是on后台运行!: daemon on; 阅读全文
posted @ 2022-05-13 09:35 vx_guanchaoguo0 阅读(232) 评论(0) 推荐(0)
摘要: linux 信号64个 kill -l 查看 $ kill -l 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 阅读全文
posted @ 2022-05-11 14:03 vx_guanchaoguo0 阅读(26) 评论(0) 推荐(0)
摘要: 发布消息的时候 通道被关闭 提前将channel 关闭 生产和消费则配置不一致 交换机 队列 绑定 三者对不上导致 无法发布 阅读全文
posted @ 2022-05-11 11:53 vx_guanchaoguo0 阅读(236) 评论(0) 推荐(0)
摘要: sublime 默认主题不是很好看 安装Brogrammer 下载主题包 https://github.com/kenwheeler/brogrammer-theme/archive/master.zip 解压后放到 Preferences → Browse Packages 重命名 Theme - 阅读全文
posted @ 2022-05-11 10:33 vx_guanchaoguo0 阅读(35) 评论(0) 推荐(0)
摘要: 使用注意订阅 proudcut package main import ( "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/logger" "github.com/streadway/amqp" "log" 阅读全文
posted @ 2022-05-10 20:29 vx_guanchaoguo0 阅读(124) 评论(0) 推荐(0)