Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for reuse (0.16 sec)

  1. internal/grid/README.md

    The wrapper will handle all serialization and de-seralization of the request and response,
    and furthermore provides reuse of the structs used for the request and response.
    
    Note that Responses sent for serialization are automatically reused for similar requests.
    If the response contains shared data it will cause issues, since each unique response is reused.
    To disable this behavior, use `(SingleHandler).WithSharedResponse()` to disable it.
    
    Plain Text
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  2. cmd/metacache-server-pool.go

    		} else {
    			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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  3. cmd/storage-rest-client.go

    		if resp.Update != nil {
    			select {
    			case <-ctx.Done():
    			case updates <- *resp.Update:
    			}
    		}
    		if resp.Final != nil {
    			final = resp.Final
    		}
    		// We can't reuse the response since it is sent upstream.
    		return nil
    	})
    	if err != nil {
    		return cache, toStorageErr(err)
    	}
    	if final == nil {
    		return cache, errors.New("no final cache")
    	}
    	return *final, nil
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  4. internal/http/close.go

    //
    // Subsequently this allows golang http RoundTripper
    // to reuse the same connection for future requests.
    func DrainBody(respBody io.ReadCloser) {
    	// Callers should close resp.Body when done reading from it.
    	// If resp.Body is not closed, the Client's underlying RoundTripper
    	// (typically Transport) may not be able to reuse a persistent TCP
    	// connection to the server for a subsequent "keep-alive" request.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  5. internal/s3select/parquet/reader.go

    			value, err = convertFromAnnotation(col.Element(), v)
    			if err != nil {
    				return nil, errParquetParsingError(err)
    			}
    		}
    		kvs = append(kvs, jstream.KV{Key: col.FlatName(), Value: value})
    	}
    
    	// Reuse destination if we can.
    	dstRec, ok := dst.(*jsonfmt.Record)
    	if !ok {
    		dstRec = &jsonfmt.Record{}
    	}
    	dstRec.SelectFormat = sql.SelectFmtParquet
    	dstRec.KVS = kvs
    	return dstRec, nil
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 14 13:54:47 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  6. internal/grid/handlers.go

    		s.callReuseReq = true
    	}
    	return &s
    }
    
    // PutResponse will accept a response for reuse.
    // This can be used by a caller to recycle a response after receiving it from a Call.
    func (h *SingleHandler[Req, Resp]) PutResponse(r Resp) {
    	h.recycleResp(r)
    }
    
    // AllowCallRequestPool indicates it is safe to reuse the request
    // on the client side, meaning the request is recycled/pooled when a request is sent.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 26.9K bytes
    - Viewed (0)
  7. cmd/metacache-entries.go

    	return res
    }
    
    // metaCacheEntriesSorted contains metacache entries that are sorted.
    type metaCacheEntriesSorted struct {
    	o metaCacheEntries
    	// list id is not serialized
    	listID string
    	// Reuse buffers
    	reuse bool
    	// Contain the last skipped object after an ILM expiry evaluation
    	lastSkippedEntry string
    }
    
    // shallowClone will create a shallow clone of the array objects,
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:43:43 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  8. internal/s3select/select.go

    			} else {
    				var outputRecord sql.Record
    				// We will attempt to reuse the records in the table.
    				// The type of these should not change.
    				// The queue should always have at least one entry left for this to work.
    				outputQueue = outputQueue[:len(outputQueue)+1]
    				if t := outputQueue[len(outputQueue)-1]; t != nil {
    					// If the output record is already set, we reuse it.
    					outputRecord = t
    					outputRecord.Reset()
    				} else {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Nov 06 22:26:08 GMT 2023
    - 21K bytes
    - Viewed (0)
  9. internal/rest/client.go

    func removeEmptyPort(host string) string {
    	if hasPort(host) {
    		return strings.TrimSuffix(host, ":")
    	}
    	return host
    }
    
    // Copied from http.NewRequest but implemented to ensure we reuse `url.URL` instance.
    func (c *Client) newRequest(ctx context.Context, u url.URL, body io.Reader) (*http.Request, error) {
    	rc, ok := body.(io.ReadCloser)
    	if !ok && body != nil {
    		rc = io.NopCloser(body)
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14K bytes
    - Viewed (0)
  10. internal/s3select/simdj/reader.go

    		close(r.decoded)
    		readCloser.Close()
    		for range r.input {
    			// Read until EOF trickles through.
    			// Otherwise, we risk the decoder hanging.
    		}
    		r.readerWg.Done()
    	}
    
    	// We cannot reuse as we are sending parsed objects elsewhere.
    	simdjson.ParseNDStream(readCloser, r.input, nil)
    	r.readerWg.Add(1)
    	go r.startReader()
    	return &r
    }
    
    // NewElementReader - creates new JSON reader using readCloser.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue May 30 17:02:22 GMT 2023
    - 4.9K bytes
    - Viewed (0)
Back to top