- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for setSubroute (0.04 sec)
-
internal/grid/handlers.go
func GetCaller(ctx context.Context) *RemoteClient { val, _ := ctx.Value(ctxCallerKey{}).(*RemoteClient) return val } // GetSubroute returns caller information from contexts provided to handlers. func GetSubroute(ctx context.Context) string { //nolint:staticcheck // SA1029 Staticcheck is drunk. val, _ := ctx.Value(ctxSubrouteKey{}).(string) return val }
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Tue Feb 18 16:25:55 UTC 2025 - 27.7K bytes - Viewed (0) -
internal/grid/grid_test.go
// 1: Echo register := func(manager *Manager) { errFatal(handler.Register(manager, func(ctx context.Context, pp *testRequest, in <-chan *testRequest, out chan<- *testResponse) *RemoteErr { sub := GetSubroute(ctx) if sub != "subroute/1" { t.Fatal("expected subroute/1, got", sub) } n := 0 for i := range in { if n > payloads { panic("too many requests") }
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 36.1K bytes - Viewed (0)