Documentation ¶
Index ¶
- type Registerer
- func (r *Registerer) Collect(metrics chan<- prometheus.Metric)
- func (r *Registerer) Describe(descs chan<- *prometheus.Desc)
- func (r *Registerer) IsRegistered() bool
- func (r *Registerer) Run(ctx context.Context) error
- func (r *Registerer) SetLeaderURL(leaderURL string)
- func (r *Registerer) SetRegistered(registered bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registerer ¶
type Registerer struct { EndPointURL string // contains filtered or unexported fields }
A Registerer attempts to register the instance with the leader on a regular basis
func (*Registerer) Collect ¶
func (r *Registerer) Collect(metrics chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface
func (*Registerer) Describe ¶
func (r *Registerer) Describe(descs chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface
func (*Registerer) IsRegistered ¶
func (r *Registerer) IsRegistered() bool
IsRegistered returns true if the endpoint is successfully registered with a broker
func (*Registerer) Run ¶
func (r *Registerer) Run(ctx context.Context) error
Run implements the main loop of a Registerer. It registers with the leader on a regular basis, informing the leading broker of an instance to take into account, as well as acting as a keep-alive for the leading broker.
func (*Registerer) SetLeaderURL ¶
func (r *Registerer) SetLeaderURL(leaderURL string)
SetLeaderURL sets the URL of the leader
func (*Registerer) SetRegistered ¶
func (r *Registerer) SetRegistered(registered bool)
Click to show internal directories.
Click to hide internal directories.