Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewEndpoint (0.17 sec)

  1. cmd/lock-rest-client_test.go

    )
    
    // Tests lock rpc client.
    func TestLockRESTlient(t *testing.T) {
    	// These should not be connectable.
    	endpoint, err := NewEndpoint("http://localhost:9876")
    	if err != nil {
    		t.Fatalf("unexpected error %v", err)
    	}
    	endpointLocal, err := NewEndpoint("http://localhost:9012")
    	if err != nil {
    		t.Fatalf("unexpected error %v", err)
    	}
    	endpointLocal.IsLocal = true
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 2K bytes
    - Viewed (0)
  2. cmd/storage-rest_test.go

    	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 {
    		t.Fatalf("UpdateIsLocal failed %v", err)
    	}
    
    	endpoint.PoolIdx = 0
    	endpoint.SetIdx = 0
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  3. cmd/endpoint.go

    	endpoint.SetIdx = i
    }
    
    // SetDiskIndex sets a specific disk number to this node
    func (endpoint *Endpoint) SetDiskIndex(i int) {
    	endpoint.DiskIdx = i
    }
    
    // NewEndpoint - returns new endpoint based on given arguments.
    func NewEndpoint(arg string) (ep Endpoint, e error) {
    	// isEmptyPath - check whether given path is not empty.
    	isEmptyPath := func(path string) bool {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 34.1K bytes
    - Viewed (0)
  4. cmd/endpoint_test.go

    	}
    
    	for i, test := range testCases {
    		t.Run(fmt.Sprint("case-", i), func(t *testing.T) {
    			endpoint, err := NewEndpoint(test.arg)
    			if err == nil {
    				err = endpoint.UpdateIsLocal()
    			}
    
    			switch {
    			case test.expectedErr == nil:
    				if err != nil {
    					t.Errorf("error: expected = <nil>, got = %v", err)
    				}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Jan 13 07:53:03 GMT 2024
    - 18.9K bytes
    - Viewed (1)
Back to top