Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for payload (0.25 sec)

  1. internal/grid/grid_test.go

    	errFatal(local.RegisterSingleHandler(handlerTest, func(payload []byte) ([]byte, *RemoteErr) {
    		t.Log("1: server payload: ", len(payload), "bytes.")
    		return append([]byte{}, payload...), nil
    	}))
    	// 2: Return as error
    	errFatal(local.RegisterSingleHandler(handlerTest2, func(payload []byte) ([]byte, *RemoteErr) {
    		t.Log("2: server payload: ", len(payload), "bytes.")
    		err := RemoteErr(payload)
    		return nil, &err
    	}))
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 08 18:15:27 GMT 2024
    - 30.1K bytes
    - Viewed (0)
  2. internal/grid/connection_test.go

    	errFatal(local.RegisterSingleHandler(handlerTest, func(payload []byte) ([]byte, *RemoteErr) {
    		t.Log("1: server payload: ", len(payload), "bytes.")
    		return append([]byte{}, payload...), nil
    	}))
    	// 2: Return as error
    	errFatal(local.RegisterSingleHandler(handlerTest2, func(payload []byte) ([]byte, *RemoteErr) {
    		t.Log("2: server payload: ", len(payload), "bytes.")
    		err := RemoteErr(payload)
    		return nil, &err
    	}))
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 6K bytes
    - Viewed (0)
  3. internal/grid/muxserver.go

    				fmt.Println("muxServer: Mux", m.ID, "send EOF", hErr)
    			}
    			msg.Flags |= FlagEOF
    			if hErr != nil {
    				msg.Flags |= FlagPayloadIsErr
    				msg.Payload = []byte(*hErr)
    			}
    			msg.setZeroPayloadFlag()
    			m.send(msg)
    			return
    		}
    		msg.Payload = payload
    		msg.setZeroPayloadFlag()
    		m.send(msg)
    	}
    }
    
    // handleRequests will handle the requests from the client and call the handler function.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  4. internal/grid/benchmark_test.go

    	b.Cleanup(grid.Cleanup)
    	// Create n managers.
    	for _, remote := range grid.Managers {
    		// Register a single handler which echos the payload.
    		errFatal(remote.RegisterSingleHandler(handlerTest, func(payload []byte) ([]byte, *RemoteErr) {
    			defer PutByteBuffer(payload)
    			return append(GetByteBuffer()[:0], payload...), nil
    		}))
    		errFatal(rpc.Register(remote, func(req *testRequest) (resp *testResponse, err *RemoteErr) {
    			return &testResponse{
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 12.2K bytes
    - Viewed (0)
  5. cni/pkg/nodeagent/ztunnelserver_test.go

    	// in theory we should close the fd, but it's just a test..
    
    	assert.Equal(t, m.Payload.(*zdsapi.WorkloadRequest_Add).Add.Uid, uid)
    	// send ack so the server doesn't wait for us.
    	sendAck(ztunClient)
    
    	// second message should be the snap sent message
    	m, fds = readRequest(t, ztunClient)
    	assert.Equal(t, len(fds), 0)
    
    	sent := m.Payload.(*zdsapi.WorkloadRequest_SnapshotSent).SnapshotSent
    	if sent == nil {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  6. internal/grid/msg.go

    	var sub *subHandlerID
    	if m.Payload == nil {
    		m.Payload = GetByteBuffer()[:0]
    	}
    	h, err := m.UnmarshalMsg(b)
    	if err != nil {
    		return nil, nil, fmt.Errorf("read write: %v", err)
    	}
    	if len(m.Payload) == 0 && m.Flags&FlagPayloadIsZero == 0 {
    		PutByteBuffer(m.Payload)
    		m.Payload = nil
    	}
    	if m.Flags&FlagCRCxxh3 != 0 {
    		const hashLen = 4
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 28 19:22:29 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  7. cmd/streaming-signature-v4.go

    	if errCode != ErrNone {
    		return cred, "", "", time.Time{}, errCode
    	}
    
    	// Payload streaming.
    	payload := streamingContentSHA256
    	if trailers {
    		payload = streamingContentSHA256Trailer
    	}
    
    	// Payload for STREAMING signature should be 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD'
    	if payload != req.Header.Get(xhttp.AmzContentSha256) {
    		return cred, "", "", time.Time{}, ErrContentSHA256Mismatch
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  8. internal/s3select/message.go

    		progressTicker.Stop()
    	}
    
    	// Whatever drain the payloadCh to prevent from memory leaking.
    	for len(writer.payloadCh) > 0 {
    		payload := <-writer.payloadCh
    		bufPool.Put(payload)
    	}
    }
    
    // Sends a single whole record.
    func (writer *messageWriter) SendRecord(payload *bytes.Buffer) error {
    	select {
    	case writer.payloadCh <- payload:
    		return nil
    	case <-writer.doneCh:
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Aug 30 15:26:43 GMT 2022
    - 15.2K bytes
    - Viewed (0)
  9. internal/grid/handlers.go

    	NewStream(ctx context.Context, h HandlerID, payload []byte) (st *Stream, err error)
    }
    
    // Call the remove with the request and
    func (h *StreamTypeHandler[Payload, Req, Resp]) Call(ctx context.Context, c Streamer, payload Payload) (st *TypedStream[Req, Resp], err error) {
    	if c == nil {
    		return nil, ErrDisconnected
    	}
    	var payloadB []byte
    	if h.WithPayload {
    		var err error
    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)
  10. internal/grid/muxclient.go

    		return
    	}
    
    	// Route directly to output.
    	m.respWait = out
    }
    
    // RequestStream will send a single payload request and stream back results.
    // 'requests' can be nil, in which case only req is sent as input.
    // It will however take less resources.
    func (m *muxClient) RequestStream(h HandlerID, payload []byte, requests chan []byte, responses chan Response) (*Stream, error) {
    	if m.init {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
Back to top