go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

etcd in the gateway configuration cannot inherit the defined

Open eyjian opened this issue 4 months ago • 1 comments

Do not configure Hosts in Upstreams:

Etcd:
  Hosts:
    - 127.0.0.1:2379

Login: # Login service client conf
  Prefix: /v1
  Etcd:
    Key: mooonlogin.rpc

Auth: # Authentication service client conf
  Prefix: /v2
  Etcd:
    Key: mooonauth.rpc

Upstreams: # upstreams
  - Grpc:
      Etcd:
        #Hosts:
        #  - 127.0.0.1:2379
        Key: mooonlogin.rpc

Error when running:

config file etc/gateway.yaml, type mismatch for field "Upstreams[0].Grpc.etcd.Hosts"

eyjian avatar Feb 21 '24 02:02 eyjian