Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,660 for Dealer (0.45 sec)

  1. staging/src/k8s.io/apiserver/pkg/util/shufflesharding/shufflesharding_test.go

    		},
    	}
    	for _, test := range tests {
    		hashValue := rand.Uint64()
    		t.Run(test.name, func(t *testing.T) {
    			dealer, err := NewDealer(test.deckSize, test.handSize)
    			if err != nil {
    				t.Errorf("fail to create Dealer: %v", err)
    				return
    			}
    			hand := make([]int, 0)
    			hand = dealer.DealIntoHand(hashValue, hand)
    
    			// check cards number
    			if len(hand) != int(test.handSize) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 25 06:44:08 UTC 2021
    - 6.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/util/shufflesharding/shufflesharding.go

    	return int(math.Ceil(math.Log2(float64(deckSize)) * float64(handSize)))
    }
    
    // Dealer contains some necessary parameters and provides some methods for shuffle sharding.
    // Dealer is thread-safe.
    type Dealer struct {
    	deckSize int
    	handSize int
    }
    
    // NewDealer will create a Dealer with the given deckSize and handSize, will return error when
    // deckSize or handSize is invalid as below.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 23 08:38:03 UTC 2019
    - 4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go

    	// was last non-zero (if ever).
    	qCfg fq.QueuingConfig
    
    	// the current dispatching configuration.
    	dCfg fq.DispatchingConfig
    
    	// If `qCfg.DesiredNumQueues` is non-zero then dealer is not nil
    	// and is good for `qCfg`.
    	dealer *shufflesharding.Dealer
    
    	// queues may be longer than the desired number, while the excess
    	// queues are still draining.
    	queues []*queue
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 04 16:59:21 UTC 2024
    - 42.4K bytes
    - Viewed (0)
  4. pkg/test/echo/common/dialer.go

    	DefaultGRPCDialFunc = grpc.DialContext
    	// DefaultWebsocketDialFunc just calls dialer.Dial, with no alterations to the arguments.
    	DefaultWebsocketDialFunc = func(dialer *websocket.Dialer, urlStr string, requestHeader http.Header) (*websocket.Conn, *http.Response, error) {
    		return dialer.Dial(urlStr, requestHeader)
    	}
    	// DefaultHTTPDoFunc just calls client.Do with no alterations to the arguments.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Aug 07 15:55:42 UTC 2020
    - 3K bytes
    - Viewed (0)
  5. internal/hash/reader.go

    )
    
    // A Reader wraps an io.Reader and computes the MD5 checksum
    // of the read content as ETag. Optionally, it also computes
    // the SHA256 checksum of the content.
    //
    // If the reference values for the ETag and content SHA26
    // are not empty then it will check whether the computed
    // match the reference values.
    type Reader struct {
    	src         io.Reader
    	bytesRead   int64
    	expectedMin int64
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 18 17:00:54 UTC 2023
    - 10.8K bytes
    - Viewed (0)
  6. pkg/hbone/dialer.go

    	return nil
    }
    
    // TLSDialWithDialer is an implementation of tls.DialWithDialer that accepts a generic Dialer
    func TLSDialWithDialer(dialer Dialer, network, addr string, config *tls.Config) (*tls.Conn, error) {
    	return tlsDial(context.Background(), dialer, network, addr, config)
    }
    
    func tlsDial(ctx context.Context, netDialer Dialer, network, addr string, config *tls.Config) (*tls.Conn, error) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 15:56:41 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  7. internal/etag/reader.go

    //
    //	// Now, we need an io.Reader that can access
    //	// the ETag computed over the content.
    //	reader := etag.Wrap(encryptedContent, content)
    func Wrap(wrapped, content io.Reader) io.Reader {
    	if t, ok := content.(Tagger); ok {
    		return wrapReader{
    			Reader: wrapped,
    			Tagger: t,
    		}
    	}
    	return wrapReader{
    		Reader: wrapped,
    	}
    }
    
    // A Reader wraps an io.Reader and computes the
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  8. src/archive/tar/reader.go

    	"strconv"
    	"strings"
    	"time"
    )
    
    // Reader provides sequential access to the contents of a tar archive.
    // Reader.Next advances to the next file in the archive (including the first),
    // and then Reader can be treated as an io.Reader to access the file's data.
    type Reader struct {
    	r    io.Reader
    	pad  int64      // Amount of padding (ignored) after current file entry
    	curr fileReader // Reader for current file entry
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 01:59:14 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  9. internal/s3select/simdj/reader.go

    }
    
    // NewElementReader - creates new JSON reader using readCloser.
    func NewElementReader(ch chan simdjson.Object, err *error, args *json.ReaderArgs) *Reader {
    	return &Reader{
    		args:       args,
    		decoded:    ch,
    		err:        err,
    		readCloser: nil,
    	}
    }
    
    // safeCloser will wrap a Reader as a ReadCloser.
    // It is safe to call Close while the reader is being used.
    type safeCloser struct {
    	closed uint32
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 30 17:02:22 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  10. internal/crypto/header.go

    var SSECopy = ssecCopy{}
    
    type ssecCopy struct{}
    
    // IsRequested returns true if the HTTP headers contains
    // at least one SSE-C copy header. Regular SSE-C headers
    // are ignored.
    func (ssecCopy) IsRequested(h http.Header) bool {
    	if _, ok := h[xhttp.AmzServerSideEncryptionCopyCustomerAlgorithm]; ok {
    		return true
    	}
    	if _, ok := h[xhttp.AmzServerSideEncryptionCopyCustomerKey]; ok {
    		return true
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top