Add grpc-gateway and /healthz endpoint (#133)

* Add grpc-gateway and /healthz endpoint

* Add nolint

* nosec
This commit is contained in:
Pietralberto Mazza
2024-04-19 17:11:59 +02:00
committed by GitHub
parent f135869928
commit f9e7621165
3 changed files with 144 additions and 14 deletions

View File

@@ -32,13 +32,8 @@ func (c Config) address() string {
return fmt.Sprintf(":%d", c.Port)
}
func (c Config) listener() net.Listener {
lis, _ := net.Listen("tcp", c.address())
if c.insecure() {
return lis
}
return tls.NewListener(lis, c.tlsConfig())
func (c Config) gatewayAddress() string {
return fmt.Sprintf("localhost:%d", c.Port)
}
func (c Config) tlsConfig() *tls.Config {