摘要: 原文链接:https://www.cnblogs.com/gaorong/p/16939111.html informer cache中的数据是只读的, 任何修改都先deepcopy informer cache中的数据是只读的, 任何修改都应该先deepcopy出来,然后提交apiserver, 阅读全文
posted @ 2023-10-15 10:49 salami_china 阅读(91) 评论(0) 推荐(0) 编辑
摘要: package main import ( "container/ring" "fmt" ) var size int = 10 func main() { myRing := ring.New(size) fmt.Println("Empty ring:", *myRing) for i := 0 阅读全文
posted @ 2023-08-05 16:30 salami_china 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 1、安装 gRPC 和 Protobuf protobuf 安装链接:https://liqiang.io/post/install-protobuf-in-centos-f0a9b926 protoc-gen-go 二进制构建 git clone https://github.com/golang 阅读全文
posted @ 2023-05-24 17:03 salami_china 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 源码链接:https://github.com/zupzup/boltdb-example.git package main import ( "bytes" "encoding/json" "fmt" "github.com/boltdb/bolt" "log" "time" ) // Confi 阅读全文
posted @ 2023-05-23 20:37 salami_china 阅读(6) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "time" "github.com/florianl/go-conntrack" ) func main() { // 创建 conntrack 客户端 client, err := conntrack.Dial(nil) if err != 阅读全文
posted @ 2023-04-21 21:03 salami_china 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 文档下载链接:https://www.mesalab.cn/download?id=1169&url=f%2Farticle%2Fdetail%3Fid%3D320 Microflow 在2007年,当在Linux上开始开发将成为Open vSwitch的代码时,只有内核数据包转发才能切实实 现良好 阅读全文
posted @ 2023-04-18 14:16 salami_china 阅读(161) 评论(0) 推荐(0) 编辑
摘要: at 后面值是偏移量,偏移是从以太网头末尾开始计算的,在这之后用正数表示偏移量,在这之前用负数表示偏移量 以太网数据包格式:【https://blog.csdn.net/hhpingyear/article/details/80216680】 at等于0就是上面红色区域的其实位置,负数向前偏移,正数 阅读全文
posted @ 2023-04-14 19:35 salami_china 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 在使用命令 ip link add bond0 type bond 创建 Bond 接口时,可以指定不同的 Bond 模式。常见的 Bond 模式有以下几种: mode=balance-rr:即 Round-robin 模式,是默认的 Bond 模式。在该模式下,数据包会按照轮流分发到不同的物理接口 阅读全文
posted @ 2023-04-11 16:41 salami_china 阅读(434) 评论(0) 推荐(0) 编辑
摘要: bpf_redirect_map 支持的map类型有三种: BPF_MAP_TYPE_DEVMAP BPF_MAP_TYPE_CPUMAP BPF_MAP_TYPE_XSKMAP kernel 源码中(kernel/bpf/verifier.c),除了这三种其他都会被拒绝 1)BPF_MAP_TYP 阅读全文
posted @ 2023-03-29 10:48 salami_china 阅读(533) 评论(0) 推荐(0) 编辑
摘要: 参考链接:https://developer.aliyun.com/ask/336089 当开启只有不在tcp窗口内的rst包被标志为无效,当关闭(默认)所有不在tcp窗口中的包都被标志为无效. 0:关闭 1:开启 “When packets with sequence number out-of- 阅读全文
posted @ 2023-03-23 17:02 salami_china 阅读(270) 评论(0) 推荐(0) 编辑