会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
qcy-blog
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
43
44
45
46
47
48
49
下一页
2023年10月23日
promethus监控k8s--外部
摘要: promethus监控k8s有两种方式,一直是k8s搭建自己监控自己 第二种是外部搭建好了promethus,k8s搭建pod收集信息 yaml地址为 https://github.com/starsliao/Prometheus/tree/master/kubernetes 或者 https://
阅读全文
posted @ 2023-10-23 16:03 朝阳1
阅读(97)
评论(0)
推荐(0)
2023年10月21日
ai寻路广度优先算法-php版本
摘要: <?php // 定义坐标结构 class Coordinate { public $x; public $y; public function __construct($x, $y) { $this->x = $x; $this->y = $y; } } // 定义地图大小 define("ROW
阅读全文
posted @ 2023-10-21 15:17 朝阳1
阅读(15)
评论(0)
推荐(0)
ai寻路广度优先算法
摘要: package main import ( "fmt" ) // 定义坐标结构 type Coordinate struct { x, y int } // 定义地图大小 const ( rows = 4 cols = 4 ) // 定义地图数组 var grid = [][]int{ {0, 1,
阅读全文
posted @ 2023-10-21 15:16 朝阳1
阅读(20)
评论(0)
推荐(0)
Golang logrus用法
摘要: logrus目前以及不维护了,care的话可以用zap package xlog import ( "bufio" "fmt" "github.com/sirupsen/logrus" rotatelogs "github.com/lestrrat-go/file-rotatelogs" "gith
阅读全文
posted @ 2023-10-21 14:53 朝阳1
阅读(116)
评论(0)
推荐(0)
Golang viper读取配置
摘要: go get github.com/spf13/viper config.toml title = "toml exaples" redis = "127.0.0.1:3300" [mysql] host = "192.168.1.1" ports = 3306 username = "root"
阅读全文
posted @ 2023-10-21 14:27 朝阳1
阅读(75)
评论(0)
推荐(0)
Golang sync包中errgroup的使用详解
摘要: WaitGroup 主要用于控制任务组下的并发子任务。它的具体做法就是,子任务 goroutine 执行前通过 Add 方法添加任务数目,子任务 goroutine 结束时调用 Done 标记已完成任务数,主任务 goroutine 通过 Wait 方法等待所有的任务完成后才能执行后续逻辑 pack
阅读全文
posted @ 2023-10-21 14:10 朝阳1
阅读(63)
评论(0)
推荐(0)
golang之xorm简单使用
摘要: package main import ( "fmt" _ "github.com/go-sql-driver/mysql" "xorm.io/xorm" ) type PointInfo struct { Id int64 `xorm:"pk autoincr"` ProductKey strin
阅读全文
posted @ 2023-10-21 13:59 朝阳1
阅读(113)
评论(0)
推荐(0)
2023年10月20日
Golang操作es使用mysql语法
摘要: 有时候拼接es语法太麻烦了,熟悉mysql的同学可以用mysql语法,6.X以上的es版本都支持 package main import ( "bytes" "encoding/json" "fmt" "github.com/elastic/go-elasticsearch/v8" "log" )
阅读全文
posted @ 2023-10-20 15:55 朝阳1
阅读(81)
评论(0)
推荐(0)
Golang泛型的简单使用
摘要: package main import "fmt" // MyInt ~表示不仅支持int8, 还支持int8的衍生类型int8A和int8B type MyInt interface { int | ~int8 | int16 | int32 | int64 } func getMaxNum[T
阅读全文
posted @ 2023-10-20 11:15 朝阳1
阅读(20)
评论(0)
推荐(0)
Systemd集成Golang二进制程序
摘要: 首先新建Service,名称叫做server-api vim /lib/systemd/system/server-api.service 或者 vim /etc/systemd/system/server-api.service [Unit] Description=grave server [S
阅读全文
posted @ 2023-10-20 11:09 朝阳1
阅读(54)
评论(1)
推荐(0)
上一页
1
···
43
44
45
46
47
48
49
下一页
公告