I'm just beginning to dig into ATS and liking what I'm seeing and I'm very
interested in Lua integration. Details about the Lua API are a bit sparse
though, so I had a few questions. I hate to ask really basic RTFM-ish
question but I've been banging my head against the wall of google and
digging through ATS code.


* I've seen a mention somewhere (maybe on this list) that the Lua API is
essentially a mapping of 'the API' in general. I've been looking over the
SDK docs and trying to match up stuff in there with the bits of Lua in the
examples directory. Any guidance on where to look? All of the terms I can
find to grep from the 'examples' directory are also terms that are super
common throughout the codebase (e.g. url, headers, method, etc), so I've
had no luck so far with that route.

I'm looking at a script that (edited down) does this:

function remap(request)
  url = request:url()
  request.headers['added-bool'] = true
  ...

I'm curious about things like:
  - How would I know to call my function 'remap' (it seems to find this
function automatically)
  - Where does that url() method come from (i.e. where in the regular API
can I find this and what other methods of the request object are there?)
  - Where could I find a description of the request object data structure?


* I'd like to (ab)use the Lua API to do my own remap based on the original
destination address on the ATS server. Is that stashed in the request
object somewhere?


* Are there any other Lua ATS docs kicking around, even if they're in a
very incomplete and/or rough form? I'd love to see anything you might have
and I promise not to complain about its spottiness ;)


Thanks!

Reply via email to