BindAddress returns a host:port string.
()
| 727 | |
| 728 | // BindAddress returns a host:port string. |
| 729 | func (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 |
| 738 | func (a *APIServer) Validate() error { |
no outgoing calls