11 2020 档案

摘要:package main import ( "context" "fmt" "log" "math/rand" "net/http" "sync" "time" goredis "github.com/garyburd/redigo/redis" redis "github.com/go-redis 阅读全文
posted @ 2020-11-24 18:48 雨V幕 阅读(3157) 评论(0) 推荐(1) 编辑
摘要:首先查看连接服务器的数据库的最大连接数配置 mysql -uroot -p #输入mysql root 用户密码 show variables like '%max_connections%'; #查看mysql 最大连接数 (我3.10 机器默认配置是151 这里我把它改成256) set GLO 阅读全文
posted @ 2020-11-24 18:45 雨V幕 阅读(5595) 评论(0) 推荐(0) 编辑
摘要:准备Prometheus环境和Grafana (3.10) 手动或者cli 添加nuget包引用 prometheus-net.AspNetCore 定义自定义middleview (需要其他的属性可以自己扩展这里随便举例两个属性) using Microsoft.AspNetCore.Builde 阅读全文
posted @ 2020-11-19 19:07 雨V幕 阅读(1327) 评论(1) 推荐(1) 编辑
摘要:问题找了半天。 结果发现客户端和服务器的时间相差一个小时。 时间同步之后 警告消除。数据能正常同步 阅读全文
posted @ 2020-11-19 11:08 雨V幕 阅读(614) 评论(0) 推荐(0) 编辑
摘要:首先搭建skywalking环境(docker环境)参考https://www.cnblogs.com/xiao987334176/p/13530575.html 安装es #首先修改系统参数 vim /etc/sysctl.conf #调整参数后保存 vm.max_map_count=262144 阅读全文
posted @ 2020-11-18 16:24 雨V幕 阅读(419) 评论(0) 推荐(0) 编辑
摘要:前置条件在3.10 已经部署Prometheus 和node-exporter Grafana(具体参考上一篇) 打开 https://grafana.com/grafana/dashboards/8919 import 导入dashboard 填写完名称选择完数据源保存 最终结果如下 阅读全文
posted @ 2020-11-17 15:07 雨V幕 阅读(480) 评论(0) 推荐(0) 编辑
摘要:首先搭建Grafana和Prometheus环境。 (这里为了方便使用docker 进行部署) 启动node-exporter docker run -d -p 9100:9100 \ -v "/proc:/host/proc:ro" \ -v "/sys:/host/sys:ro" \ -v "/ 阅读全文
posted @ 2020-11-17 10:49 雨V幕 阅读(527) 评论(0) 推荐(0) 编辑
摘要:打开设置选项搜索 go.useLanguageServe 关于go vscode的一些设置的问题。 代码能build 成功但是一直有错误提示(在设置中如下设置之后 然后在gopath 打开项目) 阅读全文
posted @ 2020-11-13 11:13 雨V幕 阅读(1344) 评论(0) 推荐(1) 编辑
摘要:https://github.com/TarsCloud/TarsGo/blob/master/docs/tars_go_quickstart.md https://www.dazhuanlan.com/2019/10/12/5da1e85bec29c/1.检查环境变量 。。GOROOT GOPAT 阅读全文
posted @ 2020-11-12 15:11 雨V幕 阅读(216) 评论(0) 推荐(0) 编辑
摘要:go day3 1. 关于包管理 #一个文件夹下面只能放一个package 命名空间的 .go 文件 #使用package 时候必须带上package 名称 或者在引用的时候使用 "." 特殊别名 #使用"_" 只执行包的init 方法而不引用包的其他属性 #关于包的可访问与否。 包的属性和方法大写 阅读全文
posted @ 2020-11-11 13:51 雨V幕 阅读(79) 评论(0) 推荐(0) 编辑
摘要:package main import ( "fmt" "strconv" "strings" ) //函数相关 // type calculation func(int, int) int // func add(a, b int) int { // return a + b // } // fu 阅读全文
posted @ 2020-11-06 17:36 雨V幕 阅读(93) 评论(0) 推荐(0) 编辑
摘要://冒泡 func main() { a := [...]int{3, 7, 8, 9, 1} length := len(a) var temp int for i := 0; i < length; i++ { for j := 0; j < length-1; j++ { if a[j] > 阅读全文
posted @ 2020-11-05 15:13 雨V幕 阅读(141) 评论(0) 推荐(0) 编辑
摘要:go的学习笔记 # new 和make 的区别 new - 用于分配内存 , 返回指针。 分配的空间被清零。 创建map时需要进行初始化才能使用。make - 只能用于 slice 、map 、channel 的初始化 ,返回指针指向的值。 进行初始化。 func main(){ countryCa 阅读全文
posted @ 2020-11-05 11:01 雨V幕 阅读(90) 评论(0) 推荐(0) 编辑

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