Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 120 for buffered (0.18 sec)

  1. internal/deadlineconn/deadlineconn.go

    // Package deadlineconn implements net.Conn wrapper with configured deadlines.
    package deadlineconn
    
    import (
    	"net"
    	"time"
    )
    
    // DeadlineConn - is a generic stream-oriented network connection supporting buffered reader and read/write timeout.
    type DeadlineConn struct {
    	net.Conn
    	readDeadline  time.Duration // sets the read deadline on a connection.
    	writeDeadline time.Duration // sets the write deadline on a connection.
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Nov 05 18:09:21 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  2. cmd/listen-notification-handlers.go

    	setEventStreamHeaders(w)
    
    	// Listen Publisher and peer-listen-client uses nonblocking send and hence does not wait for slow receivers.
    	// Use buffered channel to take care of burst sends or slow w.Write()
    	mergeCh := make(chan []byte, globalAPIConfig.getRequestsPoolCapacity()*len(globalEndpoints.Hostnames()))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6K bytes
    - Viewed (0)
  3. cmd/tier-journal.go

    	j := &TierJournal{
    		tierMemJournal:  newTierMemJournal(1000),
    		tierDiskJournal: newTierDiskJournal(),
    	}
    	return j
    }
    
    // Init initializes an in-memory journal built using a
    // buffered channel for new journal entries. It also initializes the on-disk
    // journal only to process existing journal entries made from previous versions.
    func (t *TierJournal) Init(ctx context.Context) error {
    Go
    - Registered: Sun Feb 25 19:28:16 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  4. cmd/xl-storage-disk-id-check.go

    	}
    	return n, err
    }
    
    // diskHealthReader provides a wrapper that will update disk health on
    // ctx, on every successful read.
    // This should only be used directly at the os/syscall level,
    // otherwise buffered operations may return false health checks.
    func diskHealthReader(ctx context.Context, r io.Reader) io.Reader {
    	// Check if context has a disk health check.
    	tracker, ok := ctx.Value(healthDiskCtxKey{}).(*healthDiskCtxValue)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 33K bytes
    - Viewed (0)
  5. internal/grid/benchmark_test.go

    					select {
    					case <-ctx.Done():
    						return nil
    					case out <- toSend:
    					}
    				}
    				return nil
    			},
    
    			Subroute:    "some-subroute",
    			OutCapacity: 1, // Only one message buffered.
    			InCapacity:  0,
    		}))
    		errFatal(err)
    	}
    	const payloadSize = 512
    	rng := rand.New(rand.NewSource(time.Now().UnixNano()))
    	payload := make([]byte, payloadSize)
    	_, err = rng.Read(payload)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 12.2K bytes
    - Viewed (0)
  6. internal/grid/grid_test.go

    			t.Error("expected context.Canceled, got", err)
    		}
    		t.Log("client after", time.Since(clientEnd))
    	}
    	// local to remote, unbuffered
    	t.Run("unbuffered", func(t *testing.T) {
    		testHandler(t, handlerTest)
    	})
    
    	t.Run("buffered", func(t *testing.T) {
    		testHandler(t, handlerTest2)
    	})
    }
    
    // testStreamDeadline will test if server
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 30 15:03:35 GMT 2024
    - 30.1K bytes
    - Viewed (0)
  7. cmd/peer-rest-server.go

    	// STREAMS
    	// Set an output capacity of 100 for consoleLog and listenRPC
    	// There is another buffer that will buffer events.
    	consoleLogRPC = grid.NewStream[*grid.MSS, grid.NoPayload, *grid.Bytes](grid.HandlerConsoleLog, grid.NewMSS, nil, grid.NewBytes).WithOutCapacity(100)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 51.8K bytes
    - Viewed (0)
  8. cmd/storage-rest-client.go

    	values.Set(storageRESTTotalVersions, strconv.Itoa(len(versions)))
    
    	var buffer bytes.Buffer
    	encoder := msgp.NewWriter(&buffer)
    	for _, version := range versions {
    		version.EncodeMsg(encoder)
    	}
    	storageLogIf(ctx, encoder.Flush())
    
    	errs = make([]error, len(versions))
    
    	respBody, err := client.call(ctx, storageRESTMethodDeleteVersions, values, &buffer, -1)
    	defer xhttp.DrainBody(respBody)
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  9. cmd/server_test.go

    	c.Assert(err, nil)
    	c.Assert(response.StatusCode, http.StatusOK)
    
    	var buffer bytes.Buffer
    	// data to be written into buffer.
    	data := "1234567890"
    	// seed the random number generator once.
    	rand.Seed(3)
    	// generate a random number between 13 and 200.
    	randInt := getRandomRange(13, 200, -1)
    	// write into buffer till length of the buffer is greater than the generated random number.
    	for i := 0; i <= randInt; i += 10 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 108K bytes
    - Viewed (0)
  10. cmd/bucket-lifecycle.go

    		es.stats.missedExpiryTasks.Add(1)
    	}
    }
    
    // globalExpiryState is the per-node instance which manages all ILM expiry tasks.
    var globalExpiryState *expiryState
    
    // newExpiryState creates an expiryState with buffered channels allocated for
    // each ILM expiry task type.
    func newExpiryState(ctx context.Context, objAPI ObjectLayer, n int) *expiryState {
    	es := &expiryState{
    		ctx:    ctx,
    		objAPI: objAPI,
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
Back to top