Documentation ¶
Index ¶
- type Leader
- func (l *Leader) Collect(ch chan<- prometheus.Metric)
- func (l *Leader) Describe(ch chan<- *prometheus.Desc)
- func (l *Leader) IsLeading() bool
- func (l *Leader) RegisterClient(clientURL string)
- func (l *Leader) Run(ctx context.Context) error
- func (l *Leader) SetLeading(leading bool)
- func (l *Leader) Stats() Stats
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Leader ¶
type Leader struct {
// contains filtered or unexported fields
}
Leader implements the Leader interface
func New ¶
func New(cfg configuration.LeaderConfiguration, logger *slog.Logger) (*Leader, error)
New creates a new LEDBroker
func (*Leader) Collect ¶
func (l *Leader) Collect(ch chan<- prometheus.Metric)
func (*Leader) Describe ¶
func (l *Leader) Describe(ch chan<- *prometheus.Desc)
func (*Leader) RegisterClient ¶
RegisterClient registers a new client with the Leader
func (*Leader) SetLeading ¶
SetLeading marks whether the Leader should lead (i.e. set led states to endpoints)
type Stats ¶
type Stats struct {
Endpoints []scheduler.RegisteredHost
}
Stats structure holds items we want to report in the /health endpoint
Click to show internal directories.
Click to hide internal directories.