摘要: 启动服务consul_conf的json文件看https://www.cnblogs.com/topass123/p/16993018.html consul agent -server -dev -ui -client 0.0.0.0 -config-dir=C:\Users\86185\go\c 阅读全文
posted @ 2022-12-19 20:39 topass123 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 编写json文件 { "service":{ "id": "hello", "name": "hello", "address": "127.0.0.1", "port": 8080, "tags": ["uth","report"], "checks":[ { "tcp": "127.0.0.1: 阅读全文
posted @ 2022-12-19 20:35 topass123 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 建立proto syntax = "proto3"; option go_package = ".;say"; package say; service SayService{ rpc SayHello(sayRequest)returns(sayResponse){} } message sayR 阅读全文
posted @ 2022-12-19 16:10 topass123 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 暂时忽略rpc的安装问题 构建rpc-server package main import ( "fmt" "net" "net/http" "net/rpc" ) type User struct { } func (u *User) GetUser(name string, out_data * 阅读全文
posted @ 2022-12-19 12:09 topass123 阅读(11) 评论(0) 推荐(0) 编辑