api/pkg/config/handler_config.go
baez90 57a7e10e74
Add Prometheus metrics (#10)
* Add Prometheus metrics

- cleanup
- update dependencies
- improve parsing of options where possible
- Update Go to latest version
2020-10-02 11:56:48 +02:00

17 lines
287 B
Go

package config
import (
"fmt"
"github.com/spf13/viper"
)
type HandlerConfig struct {
HandlerName string
Port uint16
ListenAddress string
Options *viper.Viper
}
func (h HandlerConfig) ListenAddr() string {
return fmt.Sprintf("%s:%d", h.ListenAddress, h.Port)
}