New makes a new Server. It will panic if the metrics cannot be registered.
(cfg Config)
| 286 | |
| 287 | // New makes a new Server. It will panic if the metrics cannot be registered. |
| 288 | func New(cfg Config) (*Server, error) { |
| 289 | metrics := NewServerMetrics(cfg) |
| 290 | return newServer(cfg, metrics) |
| 291 | } |
| 292 | |
| 293 | // NewWithMetrics makes a new Server using the provided Metrics. It will not attempt to register the metrics, |
| 294 | // the user is responsible for doing so. |