Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricsCollector ¶
type MetricsCollector interface {
Run() error
}
MetricsCollector defines an interface that the various collectors must implement in order to collector, process, and present metrics to the caller or client. All collectors must use the MetricsMessage structure to receive metrics, and they must implement their own struct for handling configuration.
Further, although it isn't defined in this interface, it is recommended that collectors also create their own MetricsMessage channel to be used both in the implementation (e.g., &collectorImpl{}) and to be returned to the caller. Doing so ensures that we don't end up implementing too much in main(), instead opting to push the complexity down into the individual collectors.