Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 110 for Read (0.13 sec)

  1. cmd/erasure-object_test.go

    	bucket := "bucket"
    	object := "object"
    
    	// Create "bucket"
    	err = obj.MakeBucket(ctx, bucket, MakeBucketOptions{})
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// Test: Upload a small file and read it.
    	smallData := []byte{'a'}
    	_, err = obj.PutObject(ctx, bucket, object, mustGetPutObjReader(t, bytes.NewReader(smallData), int64(len(smallData)), "", ""), ObjectOptions{})
    	if err != nil {
    		t.Fatal(err)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 36.8K bytes
    - Viewed (0)
  2. cmd/object-multipart-handlers.go

    		return
    	}
    
    	if s3Error := checkRequestAuthType(ctx, r, policy.PutObjectAction, dstBucket, dstObject); s3Error != ErrNone {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(s3Error), r.URL)
    		return
    	}
    
    	// Read escaped copy source path to check for parameters.
    	cpSrcPath := r.Header.Get(xhttp.AmzCopySource)
    	var vid string
    	if u, err := url.Parse(cpSrcPath); err == nil {
    		vid = strings.TrimSpace(u.Query().Get(xhttp.VersionID))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  3. internal/grid/handlers.go

    // TypedStream is a stream with specific types.
    type TypedStream[Req, Resp RoundTripper] struct {
    	// responses from the remote server.
    	// Channel will be closed after error or when remote closes.
    	// responses *must* be read to either an error is returned or the channel is closed.
    	responses *Stream
    	newResp   func() Resp
    
    	// Requests sent to the server.
    	// If the handler is defined with 0 incoming capacity this will be nil.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 27.1K bytes
    - Viewed (0)
  4. cmd/object_api_suite_test.go

    	return &testOneByteReadNoEOF{false, data}
    }
    
    // testOneByteReadNoEOF - implements io.Reader which returns 1 byte and nil error, but
    // returns io.EOF on the next Read().
    type testOneByteReadNoEOF struct {
    	eof  bool
    	data []byte
    }
    
    func (r *testOneByteReadNoEOF) Read(p []byte) (n int, err error) {
    	if r.eof {
    		return 0, io.EOF
    	}
    	n = copy(p, r.data)
    	r.eof = true
    	return n, nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 32.3K bytes
    - Viewed (0)
  5. src/archive/tar/writer.go

    	}
    	n, err := tw.curr.Write(b)
    	if err != nil && err != ErrWriteTooLong {
    		tw.err = err
    	}
    	return n, err
    }
    
    // readFrom populates the content of the current file by reading from r.
    // The bytes read must match the number of remaining bytes in the current file.
    //
    // If the current file is sparse and r is an io.ReadSeeker,
    // then readFrom uses Seek to skip past holes defined in Header.SparseHoles,
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  6. cmd/metacache-server-pool.go

    			if o.pool < len(z.serverPools) && o.set < len(z.serverPools[o.pool].sets) {
    				o.debugln("Resuming", o)
    				entries, err = z.serverPools[o.pool].sets[o.set].streamMetadataParts(ctx, *o)
    				entries.reuse = true // We read from stream and are not sharing results.
    				if err == nil {
    					return entries, nil
    				}
    			} else {
    				err = fmt.Errorf("invalid pool/set")
    				o.pool, o.set = 0, 0
    			}
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  7. cni/pkg/nodeagent/ztunnelserver.go

    			// Safety: Resp is buffered, so this will not block
    			update.Resp <- updateResponse{
    				err:  err,
    				resp: resp,
    			}
    
    		case <-time.After(ztunnelKeepAliveCheckInterval):
    			// do a short read, just to see if the connection to ztunnel is
    			// still alive. As ztunnel shouldn't send anything unless we send
    			// something first, we expect to get an os.ErrDeadlineExceeded error
    			// here if the connection is still alive.
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  8. istioctl/cmd/root.go

    	"istio.io/istio/pkg/cmd"
    	"istio.io/istio/pkg/collateral"
    	"istio.io/istio/pkg/config/constants"
    	"istio.io/istio/pkg/log"
    	"istio.io/istio/tools/bug-report/pkg/bugreport"
    )
    
    const (
    	// Location to read istioctl defaults from
    	defaultIstioctlConfig = "$HOME/.istioctl/config.yaml"
    )
    
    const (
    	FlagCharts = "charts"
    )
    
    // ConfigAndEnvProcessing uses spf13/viper for overriding CLI parameters
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Apr 11 20:51:30 GMT 2024
    - 10K bytes
    - Viewed (0)
  9. cmd/auth-handler_test.go

    	"context"
    	"io"
    	"net/http"
    	"net/url"
    	"os"
    	"testing"
    	"time"
    
    	"github.com/minio/minio/internal/auth"
    	"github.com/minio/pkg/v2/policy"
    )
    
    type nullReader struct{}
    
    func (r *nullReader) Read(b []byte) (int, error) {
    	return len(b), nil
    }
    
    // Test get request auth type.
    func TestGetRequestAuthType(t *testing.T) {
    	type testCase struct {
    		req   *http.Request
    		authT authType
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  10. cmd/tier.go

    	}
    
    	data, err := readConfig(ctx, objAPI, tierConfigPath)
    	if err != nil {
    		return nil, err
    	}
    
    	if len(data) <= 4 {
    		return nil, fmt.Errorf("tierConfigInit: no data")
    	}
    
    	// Read header
    	switch format := binary.LittleEndian.Uint16(data[0:2]); format {
    	case tierConfigFormat:
    	default:
    		return nil, fmt.Errorf("tierConfigInit: unknown format: %d", format)
    	}
    
    	cfg := NewTierConfigMgr()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 15.5K bytes
    - Viewed (0)
Back to top