package balancer // options holds configuration for the load balancer transport. type options struct { strategy Strategy // default RoundRobin healthChecker *HealthChecker // optional } // Option configures the load balancer transport. type Option func(*options) // WithStrategy sets the endpoint selection strategy. // If not specified, RoundRobin is used. func WithStrategy(s Strategy) Option { return func(o *options) { o.strategy = s } } // WithHealthCheck enables active health checking of endpoints. func WithHealthCheck(opts ...HealthOption) Option { return func(o *options) { o.healthChecker = newHealthChecker(opts...) } }