Documentation
¶
Index ¶
- type BrokerApp
- type Option
- func WithAdmin(addr string) Option
- func WithBackpressure(threshold float64, horizon int) Option
- func WithBalancer(b broker.Balancer) Option
- func WithBalancerFactory(fn func() broker.Balancer) Option
- func WithDefaultBalancer() Option
- func WithGRPC(addr string) Option
- func WithHTTP(addr string) Option
- func WithLassoPilot(pilot ...optimizer.PilotData) Option
- func WithLoadPredictor(window, horizon int, interval time.Duration) Option
- func WithMetricsInterval(d time.Duration) Option
- func WithOptimizer(params []optimizer.TunableParam, optCfg ...optimizer.OptimizerConfig) Option
- func WithP2CBalancer(opts ...balancer.P2COption) Option
- func WithRoundRobinBalancer(opts ...balancer.RROption) Option
- func WithScheduler(topic string, s broker.Scheduler) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerApp ¶
type BrokerApp struct {
// contains filtered or unexported fields
}
BrokerApp wires together the broker, offset store, transport, and pluggable balancer/scheduler. It is the single reusable entry point used by cmd/broker, experiments, and tests.
func (*BrokerApp) Addr ¶
Addr returns the gRPC listen address, or empty string if gRPC is not enabled.
func (*BrokerApp) HTTPAddr ¶
HTTPAddr returns the HTTP listen address, or empty string if HTTP is not enabled.
type Option ¶
type Option func(*BrokerApp)
Option configures a BrokerApp before it starts.
func WithAdmin ¶
WithAdmin enables the admin server (/healthz, /readyz, /debug/pprof/*, /metrics) on a separate port, keeping pprof and diagnostics away from client traffic.
func WithBackpressure ¶
WithBackpressure enables predictive backpressure control. threshold is the load level at which producers are throttled (default 0.85). horizon is how many steps ahead to look in the prediction (default 3).
func WithBalancer ¶
WithBalancer sets the partition balancer (default: RoundRobin).
func WithBalancerFactory ¶
WithBalancerFactory sets a factory that creates the balancer lazily.
func WithDefaultBalancer ¶
func WithDefaultBalancer() Option
func WithLassoPilot ¶
WithLassoPilot provides pilot-run data for Lasso-based parameter selection. When set, DDPG tunes only the subset of parameters that Lasso identifies as significant at the given alpha. Must be called after WithOptimizer.
func WithLoadPredictor ¶
WithLoadPredictor enables the AR(p) load predictor that feeds predicted partition loads into the DQN balancer and backpressure controller.
func WithMetricsInterval ¶
WithMetricsInterval sets how often the broker collects metrics and pushes them to the balancer/scheduler (default 100ms).
func WithOptimizer ¶
func WithOptimizer(params []optimizer.TunableParam, optCfg ...optimizer.OptimizerConfig) Option
WithOptimizer enables the TD3 auto-configuration loop that tunes broker parameters online based on live metrics.