Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for mustGetLocalIPs (0.24 sec)

  1. cmd/net.go

    	xh, err := xnet.ParseHost(hostPort)
    	if err != nil {
    		logger.FatalIf(err, "Unable to split host port %s", hostPort)
    	}
    	return xh.Name, xh.Port.String()
    }
    
    // mustGetLocalIPs returns IPs of local interface
    func mustGetLocalIPs() (ipList []net.IP) {
    	ifs, err := net.Interfaces()
    	logger.FatalIf(err, "Unable to get IP addresses of this host")
    
    	for _, interf := range ifs {
    		addrs, err := interf.Addrs()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 26 15:00:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  2. cmd/server-main.go

    func getServerListenAddrs() []string {
    	// Use a string set to avoid duplication
    	addrs := set.NewStringSet()
    	// Listen on local interface to receive requests from Console
    	for _, ip := range mustGetLocalIPs() {
    		if ip != nil && ip.IsLoopback() {
    			addrs.Add(net.JoinHostPort(ip.String(), globalMinioPort))
    		}
    	}
    	host, _ := mustSplitHostPort(globalMinioAddr)
    	if host != "" {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 33K bytes
    - Viewed (1)
Back to top