digitalocean
digitalocean copied to clipboard
Load Balancer builder functions have too many args.
It's not nice to use. :(
We could have a sub-builder for specific features. For example, we could do this for health checks,
let h = HealthProbe::tcp_port(80) // or something similar (/me not great at naming)
.unhealthy_threshold(3)
.check_interval_seconds(5);
let l = LoadBalancer::create("foo", "nyc1")
.with_probe(h);
WDYT?
Hmmm, this seems reasonable. How can we prevent the user from thinking HealthProbe may have uses on its own?