func HandlerOpts(opts promhttp.HandlerOpts) Opt {
	return opt{func(c *cfg) { c.handlerOpts = opts }}
}
HandlerOpts sets handler options to use if you wish you use the
Metrics.Handler function.

This is only useful if you both (a) do not want to provide your own registry
and (b) want to override the default handler options.
package kprom
import (
	"math"
	"net"
	"net/http"
	"strconv"
	"time"
	"github.com/prometheus/client_golang/prometheus"
	"github.com/prometheus/client_golang/prometheus/promauto"
	"github.com/prometheus/client_golang/prometheus/promhttp"
	"github.com/twmb/franz-go/pkg/kgo"
)
var (  
	_ kgo.HookBrokerConnect       = new(Metrics)
	_ kgo.HookBrokerDisconnect    = new(Metrics)
	_ kgo.HookBrokerWrite         = new(Metrics)
	_ kgo.HookBrokerRead          = new(Metrics)
	_ kgo.HookProduceBatchWritten = new(Metrics)
	_ kgo.HookFetchBatchRead      = new(Metrics)
)
type Metrics struct {
	cfg cfg
	connects    *prometheus.CounterVec
	connectErrs *prometheus.CounterVec
	disconnects *prometheus.CounterVec
	writeErrs  *prometheus.CounterVec
	writeBytes *prometheus.CounterVec
	readErrs  *prometheus.CounterVec
	readBytes *prometheus.CounterVec
	produceBytes *prometheus.CounterVec
	fetchBytes   *prometheus.CounterVec
	bufferedProduceRecords int64
	bufferedFetchRecords   int64
}
func (m *Metrics) Registry() prometheus.Registerer {
	return m.cfg.reg
}
func (m *Metrics) Handler() http.Handler {
	return promhttp.HandlerFor(m.cfg.gatherer, m.cfg.handlerOpts)
}
type cfg struct {
	namespace string
	reg      prometheus.Registerer
	gatherer prometheus.Gatherer
	handlerOpts  promhttp.HandlerOpts
	goCollectors bool
}
type RegistererGatherer interface {
	prometheus.Registerer
	prometheus.Gatherer
}
type Opt interface {
	apply(*cfg)
}
type opt struct{ fn func(*cfg) }
func (o opt) apply(c *cfg) { o.fn(c) }
func Registry(rg RegistererGatherer) Opt {
	return opt{func(c *cfg) {
		c.reg = rg
		c.gatherer = rg
	}}
}
func Registerer(reg prometheus.Registerer) Opt {
	return opt{func(c *cfg) { c.reg = reg }}
}
func Gatherer(gatherer prometheus.Gatherer) Opt {
	return opt{func(c *cfg) { c.gatherer = gatherer }}
}
func GoCollectors() Opt {
	return opt{func(c *cfg) { c.goCollectors = true }}
}