MCPcopy Create free account
hub / github.com/cloudbase/garm / BindAddress

Method BindAddress

config/config.go:729–735  ·  view source on GitHub ↗

BindAddress returns a host:port string.

()

Source from the content-addressed store, hash-verified

727
728// BindAddress returns a host:port string.
729func (a *APIServer) BindAddress() string {
730 bind := a.Bind
731 if ip := net.ParseIP(bind); ip != nil && ip.To4() == nil {
732 bind = fmt.Sprintf("[%s]", bind)
733 }
734 return fmt.Sprintf("%s:%d", bind, a.Port)
735}
736
737// Validate validates the API server config
738func (a *APIServer) Validate() error {

Callers 2

mainFunction · 0.80
TestAPIBindAddressFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestAPIBindAddressFunction · 0.64