上一页 1 2 3 4 5 6 7 8 ··· 18 下一页
摘要: 简述 es采用 倒排索引规则 新增数据时,会将数据进行 分词存储,并将分词对应的 位置记录下来 索引数据时,会将 索引关键词进行 分词拆分,后根据分词查找对应所在位置 安装es 创建 es 挂载的文件夹 mkdir -p /d/elasticsearch/config mkdir -p /d/ela 阅读全文
posted @ 2022-02-18 21:13 JaydenQiu 阅读(64) 评论(0) 推荐(0)
摘要: 安装 安装稳定版 docker pull jenkins/jenkins:lts 创建jenkin挂载目录 mkdir -p /d/jenkins_home 创建容器挂载并运行 docker run -d --name jenkins -p 8080:8080 -v /d/jenkins_home: 阅读全文
posted @ 2022-02-18 12:35 JaydenQiu 阅读(31) 评论(0) 推荐(0)
摘要: // Create db.Create(&table1{Name: "小明", Age: 80}) // INSERT INTO `table1` (`created_at`,`updated_at`,`deleted_at`,`name`,`age`) VALUES ('2022-01-09 22 阅读全文
posted @ 2022-01-09 22:05 JaydenQiu 阅读(56) 评论(0) 推荐(0)
摘要: package main import ( "gorm.io/driver/mysql" "gorm.io/gorm" "gorm.io/gorm/logger" "log" "os" "time" ) type table1 struct { gorm.Model Name string Age 阅读全文
posted @ 2022-01-09 21:15 JaydenQiu 阅读(839) 评论(0) 推荐(0)
摘要: client 端添加超时机制 // 添加超时机制 ctx,_ := context.WithTimeout(context.Background(),time.Second*3) // 执行服务端的方法 res,err := c.SayHello(ctx,&proto.StreamReqData{D 阅读全文
posted @ 2022-01-09 15:13 JaydenQiu 阅读(346) 评论(0) 推荐(0)
摘要: 插件地址 protoc-gen-validate windows下安装 go install github.com/envoyproxy/protoc-gen-validate@latest 保证 @GOPATH/BIN 下有 protoc-gen-validate.exe 保存 validate. 阅读全文
posted @ 2022-01-08 15:15 JaydenQiu 阅读(519) 评论(0) 推荐(0)
摘要: 开源拦截器 go-grpc-middleware 服务端拦截器实现 func main() { // 拦截器逻辑 interceptor := func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler 阅读全文
posted @ 2022-01-03 18:52 JaydenQiu 阅读(124) 评论(0) 推荐(0)
摘要: 客户端发送 func main() { conn,err := grpc.Dial(":50052",grpc.WithInsecure()) if err != nil { panic(err) } defer conn.Close() c := proto.NewGreeterClient(co 阅读全文
posted @ 2022-01-03 18:09 JaydenQiu 阅读(233) 评论(0) 推荐(0)
摘要: 简单模式 又称为一元 RPC,类似于常规的 http 请求,客户端发送请求,服务端响应请求 服务端流模式 stream.proto syntax = "proto3"; option go_package=".;proto"; service Greeter { rpc GetStream(Stre 阅读全文
posted @ 2022-01-02 18:51 JaydenQiu 阅读(202) 评论(0) 推荐(0)
摘要: 1、RPC (Remote Procedure Call) 远程过程调用 (一个节点请求另一个节点提供的服务) 2、对应 RPC 的是本地过程调用,函数调用是最常见的本地过程调用 3、将本地过程调用,变成远程过程调用会面临各种问题 go 内置简单 rpc 调用 server 端 package ma 阅读全文
posted @ 2022-01-02 14:41 JaydenQiu 阅读(31) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 18 下一页