zfs: move common init function out of arch-specific files
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
This commit is contained in:
parent
fafc973e94
commit
8ea822f67a
|
@ -15,3 +15,7 @@
|
|||
// +build !nozfs
|
||||
|
||||
package collector
|
||||
|
||||
func init() {
|
||||
registerCollector("zfs", defaultEnabled, NewZFSCollector)
|
||||
}
|
||||
|
|
|
@ -30,10 +30,6 @@ const (
|
|||
zfsCollectorSubsystem = "zfs"
|
||||
)
|
||||
|
||||
func init() {
|
||||
registerCollector("zfs", defaultEnabled, NewZfsCollector)
|
||||
}
|
||||
|
||||
func NewZfsCollector(logger *slog.Logger) (Collector, error) {
|
||||
return &zfsCollector{
|
||||
sysctls: []bsdSysctl{
|
||||
|
|
|
@ -58,10 +58,6 @@ type zfsCollector struct {
|
|||
logger *slog.Logger
|
||||
}
|
||||
|
||||
func init() {
|
||||
registerCollector("zfs", defaultEnabled, NewZFSCollector)
|
||||
}
|
||||
|
||||
// NewZFSCollector returns a new Collector exposing ZFS statistics.
|
||||
func NewZFSCollector(logger *slog.Logger) (Collector, error) {
|
||||
return &zfsCollector{
|
||||
|
|
|
@ -61,10 +61,6 @@ const (
|
|||
zfsCollectorSubsystem = "zfs"
|
||||
)
|
||||
|
||||
func init() {
|
||||
registerCollector("zfs", defaultEnabled, NewZfsCollector)
|
||||
}
|
||||
|
||||
func NewZfsCollector(logger *slog.Logger) (Collector, error) {
|
||||
return &zfsCollector{
|
||||
abdstatsLinearCount: prometheus.NewDesc(
|
||||
|
|
Loading…
Reference in New Issue