我有GRPC服务器192.168.1.12:8800
和192.168.1.13:8800
,我想将它们连接起来使用grpc.Dial
与IP列表,而不是服务器中发现,我该怎么办?
conn, err = grpc.Dial("192.168.1.12:8800,192.168.1.13:8800", grpc.WithInsecure())
Run Code Online (Sandbox Code Playgroud)
有错误
rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = \"transport: Error while dialing dial tcp: too many colons in address 192.168.1.12:8800,192.168.1.13:8800
Run Code Online (Sandbox Code Playgroud)