Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balancer ¶ added in v0.6.97
type Balancer interface { Get(ctx context.Context, target string, blacklisted ...core.Source) (core.Source, error) Len() int }
Balancer describes which functionalities must be provided in order to allow booster to get sources.
type Dialer ¶ added in v0.6.94
type Dialer struct {
// contains filtered or unexported fields
}
Dialer is a core.Dialer implementation, which uses a core.Balancer instance to to retrieve a source to use when it comes to dial a network connection.
func (*Dialer) DialContext ¶ added in v0.6.94
func (d *Dialer) DialContext(ctx context.Context, network, address string) (conn net.Conn, err error)
DialContext dials a connection using `network` to `address`. The connection returned is dialed through a specific network interface, which is chosen using the dialer's interal balancer provided. If it fails to create a connection using a source, it tries to dial it using another source, until source exhaustion. It that case, only the last error received is returned.
func (*Dialer) Len ¶ added in v0.6.94
Len returns the number of sources that the dialer as at it's disposal.
func (*Dialer) SetMetricsExporter ¶ added in v0.6.94
func (d *Dialer) SetMetricsExporter(exp MetricsExporter)
SetMetricsExporter makes the receiver use exp as metrics exporter.
type MetricsExporter ¶ added in v0.6.94
MetricsExporter is an inteface around the IncSelectedSource function, which is used to collect a metric when a source is selected for use.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
Package core provides components useful for containing and retrieving entities, i.e.
|
Package core provides components useful for containing and retrieving entities, i.e. |
Package metrics provides what in prometheus terms is called a metrics exporter.
|
Package metrics provides what in prometheus terms is called a metrics exporter. |
Package remote provides HTTP endpoints to control booster remotely.
|
Package remote provides HTTP endpoints to control booster remotely. |
Package listener provides a functionalities to discover and inspect sources.
|
Package listener provides a functionalities to discover and inspect sources. |
Package store is the main component that orchestrates sources.
|
Package store is the main component that orchestrates sources. |