会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
qcy-blog
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
9
10
11
12
13
14
15
16
17
···
49
下一页
2024年9月15日
php和go进行跨进程fifo通信
摘要: fifo的文件需要提前建立好,或者用程序处理 php <?php $fifoName = "my_fifo"; // 打开命名管道进行读取 $fifo = fopen($fifoName, "r+"); if ($fifo false) { die("Unable to open FIFO: $fi
阅读全文
posted @ 2024-09-15 09:35 朝阳1
阅读(39)
评论(0)
推荐(0)
2024年9月14日
Rust编写wasm入门
摘要: 文档地址 https://rustwasm.github.io/docs/wasm-bindgen/examples/without-a-bundler.html 创建项目 cargo new --lib my-wasm 添加依赖Cargo.toml [dependencies] wasm-bind
阅读全文
posted @ 2024-09-14 17:32 朝阳1
阅读(65)
评论(0)
推荐(0)
PHP使用ipc进程间通信
摘要: que.php <?php class MsgQueue { public $queue; public function __construct($queue) { $this->queue = $queue; } public function push($data, $type = 1) {
阅读全文
posted @ 2024-09-14 16:30 朝阳1
阅读(17)
评论(0)
推荐(0)
2024年9月12日
Redis 的混合持久化
摘要: aof-use-rdb-preamble 选项设置为 yes,并且要同时启用 RDB 和 AOF 两种持久化 启用 AOF 模式 将 appendonly 设置为 yes。默认是 no。 always: 每次写操作后都同步。 everysec: 每秒同步一次。 no: 由操作系统决定何时同步。 默认
阅读全文
posted @ 2024-09-12 14:54 朝阳1
阅读(54)
评论(0)
推荐(0)
Go操作nats之jetstream
摘要: 先搭建nats集群 -js 代表开启stream,这个时候必须起名字。如果节点不加入集群,那就不用配置--routes,以及-js version: "3.5" services: nats: image: nats ports: - "8222:8222" - "4222:4222" - "622
阅读全文
posted @ 2024-09-12 10:25 朝阳1
阅读(385)
评论(0)
推荐(0)
2024年9月11日
Grpc之metadata
摘要: hello.proto syntax="proto3"; package pb; option go_package = "./pb"; service Greeter { rpc SayHello(HelloRequest) returns(HelloReply){} } message Hell
阅读全文
posted @ 2024-09-11 14:45 朝阳1
阅读(27)
评论(0)
推荐(0)
Golang 之context库用法
摘要: 结构体 type Context interface { // 标识deadline是否已经设置了,没有设置时,ok的值是false,并返回初始的time.Time Deadline() (deadline time.Time, ok bool) // 返回一个channel, 当返回关闭的chan
阅读全文
posted @ 2024-09-11 09:50 朝阳1
阅读(52)
评论(0)
推荐(0)
2024年9月6日
Go简单实现几种常用的限流
摘要: 固定窗口 package main import ( "fmt" "sync" "sync/atomic" "time" ) // 定义限流结构体 type RateLimiter struct { interval time.Duration // 时间窗口 tokens int32 // 令牌总
阅读全文
posted @ 2024-09-06 09:42 朝阳1
阅读(90)
评论(0)
推荐(0)
2024年9月5日
PHP和Go之AES的CBC模式加解密
摘要: padding的填充方式可以根据自己需要修改 php $key = 'a7gE3fH9jKmN1pQ2rS4tU6vY8zW9xL0'; $iv = '7hJ3kQxZW45mNpR'; $data = '123456'; $encrypted = openssl_encrypt($data, 'A
阅读全文
posted @ 2024-09-05 15:32 朝阳1
阅读(111)
评论(0)
推荐(0)
Gin使用zap替换默认的两个日志中间件
摘要: package main import ( "encoding/json" "fmt" "github.com/gin-gonic/gin" "github.com/natefinch/lumberjack" "go.uber.org/zap" "go.uber.org/zap/zapcore" "
阅读全文
posted @ 2024-09-05 14:42 朝阳1
阅读(163)
评论(0)
推荐(0)
上一页
1
···
9
10
11
12
13
14
15
16
17
···
49
下一页
公告