Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for Subrouter (0.21 sec)

  1. cmd/test-utils_test.go

    	muxRouter := mux.NewRouter().SkipClean(true).UseEncodedPath()
    	if len(apiFunctions) > 0 {
    		// Iterate the list of API functions requested for and register them in mux HTTP handler.
    		registerAPIFunctions(muxRouter, objLayer, apiFunctions...)
    		muxRouter.Use(globalMiddlewares...)
    		return muxRouter
    	}
    	registerAPIRouter(muxRouter)
    	muxRouter.Use(globalMiddlewares...)
    	return muxRouter
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 17:26:51 GMT 2024
    - 76.2K bytes
    - Viewed (0)
  2. cmd/sts-handlers.go

    func registerSTSRouter(router *mux.Router) {
    	// Initialize STS.
    	sts := &stsAPIHandlers{}
    
    	// STS Router
    	stsRouter := router.NewRoute().PathPrefix(SlashSeparator).Subrouter()
    
    	// Assume roles with no JWT, handles AssumeRole.
    	stsRouter.Methods(http.MethodPost).MatcherFunc(func(r *http.Request, rm *mux.RouteMatch) bool {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 21:31:13 GMT 2024
    - 34.7K bytes
    - Viewed (2)
  3. internal/grid/README.md

    ## Handlers & Routes
    
    Handlers have a predefined Handler ID. 
    In addition, there can be several *static* subroutes used to differentiate between different handlers of the same ID.
    A subroute on a client must match a subroute on the server. So routes cannot be used for dynamic routing, unlike HTTP.
    
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  4. internal/grid/manager.go

    // []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 {
    		fmt.Println("RegisterSingleHandler: ", id.String(), "subroute:", s)
    	}
    
    	if len(subroute) == 0 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  5. internal/grid/connection.go

    	}
    	return c
    }
    
    // Subroute returns a static subroute for the connection.
    func (c *Connection) Subroute(s string) *Subroute {
    	if c == nil {
    		return nil
    	}
    	return &Subroute{
    		Connection: c,
    		route:      s,
    		subID:      makeSubHandlerID(0, s),
    		trace:      c.trace.subroute(s),
    	}
    }
    
    // Subroute adds a subroute to the subroute.
    // The subroutes are combined with '/'.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  6. internal/grid/trace.go

    		TraceType: madmin.TraceInternal,
    		Prefix:    "grid",
    		Local:     c.Local,
    		Remote:    c.Remote,
    		Subroute:  "",
    	}
    }
    
    // subroute adds a specific subroute to the request.
    func (c *tracer) subroute(subroute string) *tracer {
    	if c == nil {
    		return nil
    	}
    	c2 := *c
    	c2.Subroute = subroute
    	return &c2
    }
    
    type tracer struct {
    	Publisher *pubsub.PubSub[madmin.TraceInfo, madmin.TraceType]
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 02 22:54:54 GMT 2024
    - 4K bytes
    - Viewed (0)
  7. internal/grid/handlers.go

    		// Any non-nil error sent as response means no more responses are sent.
    		Handle StreamHandlerFn
    
    		// Subroute for handler.
    		// Subroute must be static and clients should specify a matching subroute.
    		// Should not be set unless there are different handlers for the same HandlerID.
    		Subroute string
    
    		// OutCapacity is the output capacity. If <= 0 capacity will be 1.
    		OutCapacity int
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 27.1K bytes
    - Viewed (0)
  8. internal/grid/benchmark_test.go

    					toSend = append(toSend, payload...)
    					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()))
    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)
  9. internal/grid/muxserver.go

    }
    
    func newMuxStream(ctx context.Context, msg message, c *Connection, handler StreamHandler) *muxServer {
    	var cancel context.CancelFunc
    	ctx = setCaller(ctx, c.remote)
    	if len(handler.Subroute) > 0 {
    		ctx = setSubroute(ctx, handler.Subroute)
    	}
    	if msg.DeadlineMS > 0 {
    		ctx, cancel = context.WithTimeout(ctx, time.Duration(msg.DeadlineMS)*time.Millisecond+c.addDeadline)
    	} else {
    		ctx, cancel = context.WithCancel(ctx)
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. internal/grid/muxclient.go

    	if err != nil {
    		return err
    	}
    	if msg.Flags&FlagSubroute != 0 {
    		if m.subroute == nil {
    			return fmt.Errorf("internal error: subroute not defined on client")
    		}
    		hid := m.subroute.withHandler(msg.Handler)
    		before := len(dst)
    		dst = append(dst, hid[:]...)
    		if debugPrint {
    			fmt.Println("Added subroute", hid.String(), "to message", msg, "len", len(dst)-before)
    		}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
Back to top