ceremonyclient/go-libp2p/p2p/transport/quicreuse/options.go

19 lines
340 B
Go
Raw Normal View History

2023-08-21 03:50:38 +00:00
package quicreuse
type Option func(*ConnManager) error
func DisableReuseport() Option {
return func(m *ConnManager) error {
m.enableReuseport = false
return nil
}
}
// EnableMetrics enables Prometheus metrics collection.
func EnableMetrics() Option {
return func(m *ConnManager) error {
m.enableMetrics = true
return nil
}
}