Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for HandlerID (0.21 sec)

  1. internal/grid/handlers.go

    	"sync"
    
    	"github.com/minio/minio/internal/hash/sha256"
    	xioutil "github.com/minio/minio/internal/ioutil"
    	"github.com/tinylib/msgp/msgp"
    )
    
    //go:generate stringer -type=HandlerID -output=handlers_string.go -trimprefix=Handler msg.go $GOFILE
    
    // HandlerID is a handler identifier.
    // It is used to determine request routing on the server.
    // Handlers can be registered with a static subroute.
    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. internal/grid/handlers_string.go

    func (i HandlerID) String() string {
    	if i >= HandlerID(len(_HandlerID_index)-1) {
    		return "HandlerID(" + strconv.FormatInt(int64(i), 10) + ")"
    	}
    	return _HandlerID_name[_HandlerID_index[i]:_HandlerID_index[i+1]]
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 01 23:42:09 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  3. internal/grid/msg_gen.go

    	return
    }
    
    // DecodeMsg implements msgp.Decodable
    func (z *HandlerID) DecodeMsg(dc *msgp.Reader) (err error) {
    	{
    		var zb0001 uint8
    		zb0001, err = dc.ReadUint8()
    		if err != nil {
    			err = msgp.WrapError(err)
    			return
    		}
    		(*z) = HandlerID(zb0001)
    	}
    	return
    }
    
    // EncodeMsg implements msgp.Encodable
    func (z HandlerID) EncodeMsg(en *msgp.Writer) (err error) {
    	err = en.WriteUint8(uint8(z))
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 18.8K bytes
    - Viewed (0)
  4. internal/grid/msg.go

    //
    //go:generate msgp -unexported -file=$GOFILE
    //go:generate stringer -type=Op -output=msg_string.go -trimprefix=Op $GOFILE
    
    // Op is operation type messages.
    type Op uint8
    
    // HandlerID is the ID for the handler of a specific type.
    type HandlerID uint8
    
    const (
    	// OpConnect is a connect request.
    	OpConnect Op = iota + 1
    
    	// OpConnectResponse is a response to a connect request.
    	OpConnectResponse
    
    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)
  5. internal/grid/manager.go

    }
    
    // RegisterSingleHandler will register a stateless handler that serves
    // []byte -> ([]byte, error) requests.
    // subroutes are joined with "/" to a single subroute.
    func (m *Manager) RegisterSingleHandler(id HandlerID, h SingleHandlerFn, subroute ...string) error {
    	if !id.valid() {
    		return ErrUnknownHandler
    	}
    	s := strings.Join(subroute, "/")
    	if debugPrint {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  6. internal/grid/muxclient.go

    		LastPong:  time.Now().Unix(),
    		BaseFlags: parent.baseFlags,
    	}
    }
    
    // roundtrip performs a roundtrip, returning the first response.
    // This cannot be used concurrently.
    func (m *muxClient) roundtrip(h HandlerID, req []byte) ([]byte, error) {
    	if m.init {
    		return nil, errors.New("mux client already used")
    	}
    	m.init = true
    	m.singleResp = true
    	msg := message{
    		Op:         OpRequest,
    		MuxID:      m.MuxID,
    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)
  7. internal/grid/connection.go

    // Request allows to do a single remote request.
    // 'req' will not be used after the call and caller can reuse.
    // If no deadline is set on ctx, a 1-minute deadline will be added.
    func (c *Connection) Request(ctx context.Context, h HandlerID, req []byte) ([]byte, error) {
    	if !h.valid() {
    		return nil, ErrUnknownHandler
    	}
    	if c.State() != StateConnected {
    		return nil, ErrDisconnected
    	}
    	// Create mux client and call.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  8. internal/grid/README.md

    From this connection individual requests can be made.
    
    Each handler, with optional subroutes can be registered with the manager using 
    `Manager.RegisterXHandler(handlerID, handler, subroutes...)`.
    
    A `Handler()` function provides an HTTP handler, which should be hooked up to the appropriate route on the 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)
  9. cmd/lock-rest-server.go

    	lockRPCUnlock      = newLockHandler(grid.HandlerLockUnlock)
    	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 {
    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)
  10. internal/grid/trace.go

    	Local     string
    	Remote    string
    	Subroute  string
    }
    
    const (
    	httpScheme  = "http://"
    	httpsScheme = "https://"
    )
    
    func (c *muxClient) traceRoundtrip(ctx context.Context, t *tracer, h HandlerID, req []byte) ([]byte, error) {
    	if t == nil || t.Publisher.NumSubscribers(t.TraceType) == 0 {
    		return c.roundtrip(h, req)
    	}
    
    	// Following trimming is needed for consistency between outputs with other internode traces.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 02 22:54:54 GMT 2024
    - 4K bytes
    - Viewed (0)
Back to top