Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for JoinHostPort (0.22 sec)

  1. cmd/endpoint.go

    	}
    	if peerSet.IsEmpty() {
    		// Local peer can be empty in FS or Erasure coded mode.
    		// If so, return globalMinioHost + globalMinioPort value.
    		if host != "" {
    			return net.JoinHostPort(host, port)
    		}
    
    		return net.JoinHostPort("127.0.0.1", port)
    	}
    	return peerSet.ToSlice()[0]
    }
    
    // GetProxyEndpointLocalIndex returns index of the local proxy endpoint
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 34.1K bytes
    - Viewed (0)
  2. internal/http/check_port_others.go

    	lc := &net.ListenConfig{}
    
    	ctx, cancel := context.WithTimeout(context.Background(), time.Second)
    	defer cancel()
    
    	l, err := lc.Listen(ctx, "tcp", net.JoinHostPort(host, port))
    	if err != nil {
    		return err
    	}
    
    	// As we are able to listen on this network, the port is not in use.
    	// Close the listener and continue check other networks.
    	return l.Close()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 03 21:12:25 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  3. cmd/common-main.go

    		}
    		// hold the port
    		l, err := net.Listen("TCP", fmt.Sprintf(":%s", p.String()))
    		if err == nil {
    			defer l.Close()
    		}
    		consoleAddr = net.JoinHostPort("", p.String())
    	}
    
    	if _, _, err := net.SplitHostPort(consoleAddr); err != nil {
    		logger.FatalIf(err, "Unable to start listening on console port")
    	}
    
    	if consoleAddr == addr {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 35.8K bytes
    - Viewed (2)
  4. cmd/ftp-server.go

    		PassivePorts:   portRange,
    		PublicIP:       publicIP,
    	})
    	if err != nil {
    		logger.Fatal(err, "unable to initialize FTP server")
    	}
    
    	logger.Info(fmt.Sprintf("%s listening on %s", name, net.JoinHostPort(publicIP, strconv.Itoa(port))))
    
    	if err = ftpServer.ListenAndServe(); err != nil {
    		logger.Fatal(err, "unable to start FTP server")
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Mar 09 03:07:08 GMT 2024
    - 4.8K bytes
    - Viewed (2)
  5. internal/http/check_port_linux.go

    				}
    			})
    			return nil
    		},
    	}
    
    	ctx, cancel := context.WithTimeout(context.Background(), time.Second)
    	defer cancel()
    
    	l, err := lc.Listen(ctx, "tcp", net.JoinHostPort(host, port))
    	if err != nil {
    		return err
    	}
    
    	// As we are able to listen on this network, the port is not in use.
    	// Close the listener and continue check other networks.
    	return l.Close()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 03 21:12:25 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  6. internal/http/dial_dnscache.go

    			return baseDialCtx(ctx, "tcp", addr)
    		}
    
    		ips, err := lookupHost(ctx, host)
    		if err != nil {
    			return nil, err
    		}
    
    		for _, ip := range ips {
    			conn, err = baseDialCtx(ctx, "tcp", net.JoinHostPort(ip, port))
    			if err == nil {
    				break
    			}
    		}
    
    		return
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jul 03 19:30:51 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  7. cmd/net.go

    		ipList = append(ipList, mustGetLocalIP6().ToSlice()...)
    	} else {
    		ipList = []string{globalMinioConsoleHost}
    	}
    
    	for _, ip := range ipList {
    		endpoint := fmt.Sprintf("%s://%s", getURLScheme(globalIsTLS), net.JoinHostPort(ip, globalMinioConsolePort))
    		consoleEndpoints = append(consoleEndpoints, endpoint)
    	}
    
    	return consoleEndpoints
    }
    
    func getAPIEndpoints() (apiEndpoints []string) {
    	if globalMinioEndpoint != "" {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 26 15:00:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  8. cmd/generic-handlers.go

    		if globalBrowserRedirectURL != nil {
    			return globalBrowserRedirectURL
    		}
    		xhost, err := xnet.ParseHost(r.Host)
    		if err != nil {
    			return nil
    		}
    		return &xnet.URL{
    			Host: net.JoinHostPort(xhost.Name, globalMinioConsolePort),
    			Scheme: func() string {
    				scheme := "http"
    				if r.TLS != nil {
    					scheme = "https"
    				}
    				return scheme
    			}(),
    		}
    	}
    	return nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 01:08:52 GMT 2024
    - 20.7K bytes
    - Viewed (0)
  9. cmd/server-main.go

    			addrs.Add(net.JoinHostPort(ip.String(), globalMinioPort))
    		}
    	}
    	host, _ := mustSplitHostPort(globalMinioAddr)
    	if host != "" {
    		ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
    		defer cancel()
    
    		haddrs, err := globalDNSCache.LookupHost(ctx, host)
    		if err == nil {
    			for _, addr := range haddrs {
    				addrs.Add(net.JoinHostPort(addr, globalMinioPort))
    			}
    		} else {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 15:54:03 GMT 2024
    - 34.9K bytes
    - Viewed (1)
  10. cmd/object-api-utils.go

    }
    
    // returns a slice of hosts by reading a slice of DNS records
    func getHostsSlice(records []dns.SrvRecord) []string {
    	hosts := make([]string, len(records))
    	for i, r := range records {
    		hosts[i] = net.JoinHostPort(r.Host, string(r.Port))
    	}
    	return hosts
    }
    
    // returns an online host (and corresponding port) from a slice of DNS records
    func getHostFromSrv(records []dns.SrvRecord) (host string) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
Back to top