Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for something (1.56 sec)

  1. internal/grid/README.md

    The server handler function has this signature: `type SingleHandlerFn func(payload []byte) ([]byte, *RemoteErr)`.
    
    Sample handler:
    ```go
        handler :=  func(payload []byte) ([]byte, *grid.RemoteErr) {
            // Do something with payload
            return []byte("response"), nil
        }
    
        err := manager.RegisterSingleHandler(grid.HandlerDiskInfo, handler)
    ```
    
    Sample call:
    ```go
        // Get a connection to the remote host
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  2. cmd/auth-handler.go

    		// base64 encoded, decode it. Decoding fails reject such
    		// requests.
    		spBytes, err := base64.StdEncoding.DecodeString(sp)
    		if err != nil {
    			// Base64 decoding fails, we should log to indicate
    			// something is malforming the request sent by client.
    			authNLogIf(GlobalContext, err, logger.ErrorKind)
    			return nil, errAuthentication
    		}
    		claims.MapClaims[sessionPolicyNameExtracted] = string(spBytes)
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 26K bytes
    - Viewed (0)
  3. cmd/object-api-utils_test.go

    			header: http.Header{
    				"Content-Type": []string{"text/plain"},
    			},
    			result: false,
    		},
    		{
    			object: "object",
    			header: http.Header{
    				"Content-Type": []string{"text/something"},
    			},
    			result: false,
    		},
    	}
    	for i, test := range testCases {
    		got := excludeForCompression(test.header, test.object, compress.Config{
    			Enabled: true,
    		})
    		if got != test.result {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 23.4K bytes
    - Viewed (0)
  4. cmd/object-api-utils.go

    		size = diskAssumeUnknownSize
    	}
    
    	var available uint64
    	var total uint64
    	var nDisks int
    	for _, disk := range di {
    		if disk == nil || disk.Total == 0 {
    			// Disk offline, no inodes or something else is wrong.
    			continue
    		}
    		nDisks++
    		total += disk.Total
    		available += disk.Total - disk.Used
    	}
    
    	if nDisks < len(di)/2 || nDisks <= 0 {
    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)
  5. internal/grid/connection.go

    func (c *Connection) handleMessages(ctx context.Context, conn net.Conn) {
    	c.updateState(StateConnected)
    	ctx, cancel := context.WithCancelCause(ctx)
    	defer cancel(ErrDisconnected)
    
    	// This will ensure that is something asks to disconnect and we are blocked on reads/writes
    	// the connection will be closed and readers/writers will unblock.
    	go c.monitorState(conn, cancel)
    
    	c.handleMsgWg.Add(2)
    	c.reconnectMu.Unlock()
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
Back to top