编写json文件

{
  "service":{
    "id": "hello",
    "name": "hello",
    "address": "127.0.0.1",
    "port": 8080,
    "tags": ["uth","report"],
    "checks":[
      {
        "tcp": "127.0.0.1:8080",
        "interval": "10s"
      }
    ]
  }
}

运行单机注册服务

consul agent -server -dev -ui -client 0.0.0.0 -config-dir=~\go\consul_conf

 

posted on 2022-12-19 20:35  topass123  阅读(4)  评论(0编辑  收藏  举报