digitalocean icon indicating copy to clipboard operation
digitalocean copied to clipboard

Load Balancer builder functions have too many args.

Open Hoverbear opened this issue 8 years ago • 2 comments

It's not nice to use. :(

Hoverbear avatar Apr 21 '17 12:04 Hoverbear

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?

wafflespeanut avatar Apr 08 '19 06:04 wafflespeanut

Hmmm, this seems reasonable. How can we prevent the user from thinking HealthProbe may have uses on its own?

Hoverbear avatar Apr 08 '19 16:04 Hoverbear