Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for mustSplitHostPort (0.11 sec)

  1. cmd/net.go

    	// IPv6 addresses of localhost.
    	localIP6 = mustGetLocalIP6()
    
    	// List of all local loopback addresses.
    	localLoopbacks = mustGetLocalLoopbacks()
    )
    
    // mustSplitHostPort is a wrapper to net.SplitHostPort() where error is assumed to be a fatal.
    func mustSplitHostPort(hostPort string) (host, port string) {
    	xh, err := xnet.ParseHost(hostPort)
    	if err != nil {
    		logger.FatalIf(err, "Unable to split host port %s", hostPort)
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jun 19 14:34:00 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  2. cmd/net_test.go

    		{"server:54321", "server", "54321"},
    		{":0", "", "0"},
    		{"server:https", "server", "443"},
    		{"server:http", "server", "80"},
    	}
    
    	for _, testCase := range testCases {
    		host, port := mustSplitHostPort(testCase.hostPort)
    		if testCase.expectedHost != host {
    			t.Fatalf("host: expected = %v, got = %v", testCase.expectedHost, host)
    		}
    
    		if testCase.expectedPort != port {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 19 08:43:09 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  3. cmd/common-main.go

    	}
    
    	globalMinioHost, globalMinioPort = mustSplitHostPort(addr)
    	if globalMinioPort == "0" {
    		p, err := xnet.GetFreePort()
    		if err != nil {
    			logger.FatalIf(err, "Unable to get free port for S3 API on the host")
    		}
    		globalMinioPort = p.String()
    		globalDynamicAPIPort = true
    	}
    
    	if globalBrowserEnabled {
    		globalMinioConsoleHost, globalMinioConsolePort = mustSplitHostPort(consoleAddr)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 21:50:11 UTC 2024
    - 31.7K bytes
    - Viewed (0)
  4. cmd/storage-rest_test.go

    	// Remote URL
    	url, err := xnet.ParseHTTPURL(tg.Servers[1].URL)
    	if err != nil {
    		t.Fatalf("unexpected error %v", err)
    	}
    	url.Path = t.TempDir()
    
    	globalMinioHost, globalMinioPort = mustSplitHostPort(url.Host)
    	globalNodeAuthToken, _ = authenticateNode(globalActiveCred.AccessKey, globalActiveCred.SecretKey)
    
    	endpoint, err := NewEndpoint(url.String())
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 22 07:04:48 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  5. cmd/endpoint.go

    	for _, ep := range l {
    		for _, endpoint := range ep.Endpoints {
    			if endpoint.Type() != URLEndpointType {
    				continue
    			}
    
    			peer := endpoint.Host
    			if endpoint.IsLocal {
    				if _, port := mustSplitHostPort(peer); port == globalMinioPort {
    					if local == "" {
    						local = peer
    					}
    				}
    			}
    
    			allSet.Add(peer)
    		}
    	}
    
    	return allSet.ToSlice(), local
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 21 22:22:24 UTC 2024
    - 34.2K bytes
    - Viewed (0)
  6. cmd/server-main.go

    	globalInternodeInterfaceOnce.Do(func() {
    		if interfaceName != "" {
    			globalInternodeInterface = interfaceName
    			return
    		}
    		ip := "127.0.0.1"
    		host, _ := mustSplitHostPort(globalLocalNodeName)
    		if host != "" {
    			if net.ParseIP(host) != nil {
    				ip = host
    			} else {
    				ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
    				defer cancel()
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 21:50:11 UTC 2024
    - 35.2K bytes
    - Viewed (1)
  7. cmd/test-utils_test.go

    	globalObjLayerMutex.Lock()
    	globalObjectAPI = objLayer
    	globalObjLayerMutex.Unlock()
    
    	// initialize peer rpc
    	host, port := mustSplitHostPort(testServer.Server.Listener.Addr().String())
    	globalMinioHost = host
    	globalMinioPort = port
    	globalMinioAddr = getEndpointsLocalAddr(testServer.Disks)
    
    	initAllSubsystems(ctx)
    
    	globalEtcdClient = nil
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 01 22:13:18 UTC 2024
    - 77K bytes
    - Viewed (0)
Back to top