Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for SingleHandler (0.24 sec)

  1. internal/grid/handlers.go

    func (h *SingleHandler[Req, Resp]) WithSharedResponse() *SingleHandler[Req, Resp] {
    	h.sharedResp = true
    	return h
    }
    
    // NewResponse creates a new response.
    // Handlers can use this to create a reusable response.
    // The response may be reused, so caller should clear any fields.
    func (h *SingleHandler[Req, Resp]) NewResponse() Resp {
    	return h.newResp()
    }
    
    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)
  2. cmd/lock-rest-client.go

    	return nil
    }
    
    // String - returns the remote host of the connection.
    func (c *lockRESTClient) String() string {
    	return c.connection.Remote
    }
    
    func (c *lockRESTClient) call(ctx context.Context, h *grid.SingleHandler[*dsync.LockArgs, *dsync.LockResp], args *dsync.LockArgs) (ok bool, err error) {
    	r, err := h.Call(ctx, c.connection, args)
    	if err != nil {
    		return false, err
    	}
    	defer h.PutResponse(r)
    	ok = r.Code == dsync.RespOK
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Nov 24 17:07:14 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  3. cmd/lock-rest-server.go

    	lockRPCRLock       = newLockHandler(grid.HandlerLockRLock)
    	lockRPCRUnlock     = newLockHandler(grid.HandlerLockRUnlock)
    )
    
    func newLockHandler(h grid.HandlerID) *grid.SingleHandler[*dsync.LockArgs, *dsync.LockResp] {
    	return grid.NewSingleHandler[*dsync.LockArgs, *dsync.LockResp](h, func() *dsync.LockArgs {
    		return &dsync.LockArgs{}
    	}, func() *dsync.LockResp {
    		return &dsync.LockResp{}
    	})
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  4. internal/grid/trace.go

    				OutputBytes:     len(resp),
    				TimeToFirstByte: end.Sub(start),
    			},
    		},
    	}
    	// If the context contains a TraceParamsKey, add it to the trace path.
    	v := ctx.Value(TraceParamsKey{})
    	// Should match SingleHandler.Call checks.
    	switch typed := v.(type) {
    	case *MSS:
    		trace.Path += typed.ToQuery()
    	case map[string]string:
    		m := MSS(typed)
    		trace.Path += m.ToQuery()
    	case *URLValues:
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 02 22:54:54 GMT 2024
    - 4K bytes
    - Viewed (0)
  5. internal/grid/README.md

    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.
    
    ## Streaming Requests
    
    Streams consists of an initial request with payload and allows for full two-way communication between the client and server.
    
    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)
Back to top