上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 49 下一页
摘要: 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)
摘要: 文档地址 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)
摘要: 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)
摘要: aof-use-rdb-preamble 选项设置为 yes,并且要同时启用 RDB 和 AOF 两种持久化 启用 AOF 模式 将 appendonly 设置为 yes。默认是 no。 always: 每次写操作后都同步。 everysec: 每秒同步一次。 no: 由操作系统决定何时同步。 默认 阅读全文
posted @ 2024-09-12 14:54 朝阳1 阅读(54) 评论(0) 推荐(0)
摘要: 先搭建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)
摘要: 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)
摘要: 结构体 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)
摘要: 固定窗口 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)
摘要: padding的填充方式可以根据自己需要修改 php $key = 'a7gE3fH9jKmN1pQ2rS4tU6vY8zW9xL0'; $iv = '7hJ3kQxZW45mNpR'; $data = '123456'; $encrypted = openssl_encrypt($data, 'A 阅读全文
posted @ 2024-09-05 15:32 朝阳1 阅读(111) 评论(0) 推荐(0)
摘要: 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 下一页