上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: 有无符号的整数,在计算机内存中是区别不出有无符号的,而是在程序里有区分。计算机中数据是以补码形式存放的,用二进制表示。比如:默认无符号型,只要在类型符号加unsigned就是无符号型,Int是有符号的。其实说白了就是:定义带符号整数的,则可以存储正负整数,定义无符号整数的,则只可以存储正整数。 有符 阅读全文
posted @ 2022-02-11 14:58 董大轩 阅读(294) 评论(0) 推荐(0) 编辑
摘要: grpc 使用 简介 参考文档 https://www.topgoer.com/%E5%BE%AE%E6%9C%8D%E5%8A%A1/gRPC/ https://segmentfault.com/u/coldstar/articles 1. 安装 https://www.topgoer.com/% 阅读全文
posted @ 2022-01-10 19:49 董大轩 阅读(614) 评论(0) 推荐(0) 编辑
摘要: GO GRPC 证书报错 报错 报错信息 transport: authentication handshake failed: x509: certificate relies on legacy Common Name field, use SANs or temporarily enable 阅读全文
posted @ 2021-12-27 15:17 董大轩 阅读(1776) 评论(1) 推荐(0) 编辑
摘要: React+Go+WEBSocket React import { Component } from 'react' import { Terminal } from 'xterm'; import 'xterm/css/xterm.css'; import Socket from './webso 阅读全文
posted @ 2021-12-24 14:36 董大轩 阅读(259) 评论(0) 推荐(0) 编辑
摘要: consul 单机伪集群搭建 配置 server_1 /usr/local/consul# cat data01/etc/service.json { "server": true, "ui_config": { "enabled": true }, "datacenter": "wsl", "da 阅读全文
posted @ 2021-11-19 13:49 董大轩 阅读(220) 评论(0) 推荐(0) 编辑
摘要: wsl支持systemctl 参考文档: https://zhuanlan.zhihu.com/p/352994199 1. 安装 daemonize 和 fontconfig apt install -y fontconfig daemonize 2.在文件 /etc/profile 末尾加入 S 阅读全文
posted @ 2021-11-04 20:59 董大轩 阅读(409) 评论(0) 推荐(0) 编辑
摘要: No space left on device 1. 磁盘满了 df -hT # 查看磁盘使用率 ### 1. 使用du确认是哪个目录满了 #### 1.1 正常查看 du -sh /* 2>/dev/null | grep G #### 1.2 --exclude可以过滤 du -sh --exc 阅读全文
posted @ 2021-10-29 14:17 董大轩 阅读(527) 评论(0) 推荐(0) 编辑
摘要: golang logrus 示例1: 输出json日志、日志按小时切割 package main import ( "io" "os" "time" rotatelogs "github.com/lestrrat-go/file-rotatelogs" log "github.com/sirupse 阅读全文
posted @ 2021-06-23 14:02 董大轩 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 手动build filebeta module 一、介绍 1.1 filebeta介绍 filebeat是一个elastic公司使用golang编写的一个收集日志的工具,基于beat编写. 已经集成了大多数主流服务日志模块(https://www.elastic.co/guide/en/beats/ 阅读全文
posted @ 2021-04-16 11:51 董大轩 阅读(486) 评论(0) 推荐(0) 编辑
摘要: golang从ES获取数据并计算存在那个codis的slot 环境是已经将redis的bigkey存入ES 1. 获取字符串存在那个slot 1.1 官方命令 SLOTSHASHKEY key1 [key2 …] 命令说明:计算并返回给定 key 的 slot 序号 命令参数:输入为 1 个或多个 阅读全文
posted @ 2021-04-05 22:29 董大轩 阅读(442) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 10 下一页