我把python服务放到了docker里,映射了7041:7041端口,服务启动用的7041端口
有几个问题想请教一下老师,
server.add_insecure_port(f'{args.ip}:{port}')
是不是应该改成下面这个呢
server.add_secure_port(f'{args.ip}:{port}', server_credentials)
server_credentials是什么参数呢。。。证书吗?格式应该什么什么样的呢
register.register(name=config["name"], service_id=server_id, address="47.98.244.204", port=port, tags=config["tags"], check=None)
grpc.Dial(
fmt.Sprintf("consul://%s:%d/%s?wait=14s", wap.SrvConf.Consul.Host, wap.SrvConf.Consul.Port, wap.SrvConf.BaseSrv.Name),
grpc.WithInsecure(),
grpc.WithDefaultServiceConfig(`{"loadBalancingPolicy": "round_robin"}`),
grpc.WithUnaryInterceptor(unaryClientInterceptor),
)