Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. cmd/net.go

    	"github.com/minio/minio/internal/logger"
    	xnet "github.com/minio/pkg/v2/net"
    )
    
    // IPv4 addresses of local host.
    var localIP4 = mustGetLocalIP4()
    
    // 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)
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Mar 26 15:00:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  2. 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
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 34.1K bytes
    - Viewed (0)
  3. 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 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 08:43:09 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  4. 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
    	}
    
    	globalMinioConsoleHost, globalMinioConsolePort = mustSplitHostPort(consoleAddr)
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Apr 17 00:34:45 GMT 2024
    - 35.5K bytes
    - Viewed (2)
  5. 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)
    
    	endpoint, err := NewEndpoint(url.String())
    	if err != nil {
    		t.Fatalf("NewEndpoint failed %v", endpoint)
    	}
    
    	if err = endpoint.UpdateIsLocal(); err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 11.4K 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()
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 32.7K 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
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:06:57 GMT 2024
    - 75.7K bytes
    - Viewed (0)
Back to top