MCPcopy Index your code
hub / github.com/zalando/skipper / serveRequest

Function serveRequest

script/script.go:333–349  ·  view source on GitHub ↗
(f filters.FilterContext)

Source from the content-addressed store, hash-verified

331}
332
333func serveRequest(f filters.FilterContext) func(*lua.LState) int {
334 return func(s *lua.LState) int {
335 t := s.Get(-1)
336 r, ok := t.(*lua.LTable)
337 if !ok {
338 // TODO(sszuecs): https://github.com/zalando/skipper/issues/1487
339 // s.RaiseError("unsupported type %v, need a table", t.Type())
340 // return 0
341 s.Push(lua.LString("invalid type, need a table"))
342 return 1
343 }
344 res := &http.Response{}
345 r.ForEach(serveTableWalk(res))
346 f.Serve(res)
347 return 0
348 }
349}
350
351func serveTableWalk(res *http.Response) func(lua.LValue, lua.LValue) {
352 return func(k, v lua.LValue) {

Callers 1

getContextValueFunction · 0.85

Calls 3

serveTableWalkFunction · 0.85
GetMethod · 0.65
ServeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…