nexus_operation_http_handler.go ×4

Frontier kind: Code frontier

unlabeled · c_6190d7a67db2

3 tests · 3039 LOC · 153 files · introduces 0 tests · 22 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges22 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
459 ranges3039 lines · 153 files · Browse complete extent
All tests (intent)
3 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 22 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/frontend/nexus_operation_http_handler.go 20 introduced LOC · 4 ranges

Open complete file

113 }
114
115 > func (h *NexusOperationHTTPHandler) writeFailure(writer http.ResponseWriter, r *http.Request, err error) { nexus_operation_http_handler.go
116 > h.preprocessErrorCounter.Record(1)
117 > h.base.WriteFailure(writer, r, err)
118 > }
119
120 // Handler for [nexushttp.RouteSet.DispatchNexusTaskByNamespaceAndTaskQueue].
159
160 // Handler for [nexushttp.RouteSet.DispatchNexusTaskByEndpoint].
161 > func (h *NexusOperationHTTPHandler) dispatchNexusTaskByEndpoint(w http.ResponseWriter, r *http.Request) { nexus_operation_http_handler.go
162 > endpointIDEscaped := prepareRequest(commonnexus.RouteDispatchNexusTaskByEndpoint, w, r)
163 >
164 > endpointID, err := url.PathUnescape(endpointIDEscaped)
165 > if err != nil {
166 h.logger.Error("invalid URL", tag.Error(err))
167 h.writeFailure(w, r, nexus.NewHandlerErrorf(nexus.HandlerErrorTypeBadRequest, "invalid URL"))
168 return
169 }
170 > endpointEntry, err := h.enpointRegistry.GetByID(r.Context(), endpointID) nexus_operation_http_handler.go
171 > if err != nil {
172 h.logger.Error("invalid Nexus endpoint ID", tag.Error(err))
173 s, ok := status.FromError(err)
265 }
266
267 > func prepareRequest[T any](route routing.Route[T], w http.ResponseWriter, r *http.Request) T { nexus_operation_http_handler.go
268 > // Limit the request body to max allowed Payload size.
269 > // Content headers are transformed to Payload metadata and contribute to the Payload size as well. A separate
270 > // limit is enforced on top of this in the nexusHandler.StartOperation method.
271 > r.Body = http.MaxBytesReader(w, r.Body, rpc.MaxNexusAPIRequestBodyBytes)
272 >
273 > vars := mux.Vars(r)
274 > return route.Deserialize(vars)
275 > }
276
277 func (h *NexusOperationHTTPHandler) parseTLSAndAuthInfo(r *http.Request, nc *nexusContext) (*http.Request, error) {
go.temporal.io/server/common/nexus/nexusrpc/server.go 2 introduced LOC · 1 range

Open complete file

146 case nexus.HandlerErrorTypeUnauthorized:
147 statusCode = http.StatusForbidden
148 > case nexus.HandlerErrorTypeNotFound: server.go
149 > statusCode = http.StatusNotFound
150 case nexus.HandlerErrorTypeResourceExhausted:
151 statusCode = http.StatusTooManyRequests