- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for GetSubroute (0.27 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 36.4K bytes - Viewed (0)