包含 _ "github.com/micro/go-plugins/config/source/grpc/v2" 运行告警
程序目录结构
. ├── local │ └── local.go ├── main.go
1 directory, 3 files
文件 Main.go
package main
import (
//"github.com/gin-gonic/gin"
"net/http"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/registry/etcd"
"github.com/micro/go-micro/v2/web"
// "github.com/micro/go-plugins/config/source/grpc"
_ "webir-go/ad/web/test/local"
"github.com/siddontang/go/log"
)
func main() {
reg := etcd.NewRegistry(func(op *registry.Options) {
op.Addrs = []string{
"http://127.0.0.1:2379",
}
})
service := web.NewService(
web.Name("webir:ad:http"),
web.Version("0.0.1"),
web.Registry(reg),
web.Address(":9002"),
)
service.HandleFunc("/hello", func(w http.ResponseWriter, req *http.Request) {
w.Write([]byte("Hello!!!"))
})
err := service.Run()
if err != nil {
log.Info(err)
}
}
文件 Local.go
package local
import ( _ "github.com/micro/go-plugins/config/source/grpc/v2" )
上述程序编译,执行后,输出以下内容:
2020-04-28 16:18:45.061320 I | WARNING: proto: message ChangeSet is already registered A future release will panic on registration conflicts. See: https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
2020-04-28 16:18:45.061562 I | WARNING: proto: message ReadRequest is already registered A future release will panic on registration conflicts. See: https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
2020-04-28 16:18:45.061589 I | WARNING: proto: message ReadResponse is already registered A future release will panic on registration conflicts. See: https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
2020-04-28 16:18:45.061605 I | WARNING: proto: message WatchRequest is already registered A future release will panic on registration conflicts. See: https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
2020-04-28 16:18:45.061619 I | WARNING: proto: message WatchResponse is already registered A future release will panic on registration conflicts. See: https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
2020-04-28 16:18:45.061791 I | WARNING: proto: file "grpc.proto" has a name conflict over WatchResponse A future release will panic on registration conflicts. See: https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
2020-04-28 16:18:45.061809 I | WARNING: proto: file "grpc.proto" has a name conflict over WatchRequest A future release will panic on registration conflicts. See: https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
2020-04-28 16:18:45.061822 I | WARNING: proto: file "grpc.proto" has a name conflict over ReadResponse A future release will panic on registration conflicts. See: https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
2020-04-28 16:18:45.061831 I | WARNING: proto: file "grpc.proto" has a name conflict over ReadRequest A future release will panic on registration conflicts. See: https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
2020-04-28 16:18:45.062112 I | WARNING: proto: file "grpc.proto" has a name conflict over ChangeSet A future release will panic on registration conflicts. See: https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict
请问这是什么问题?
请在你的仓库里提供完整源码
这个和config有关,建议你到官方库去提醒作者更新。