table.lookup_rtime

RTIMEtable.lookup_rtimeIDidSTRINGkeyRTIMEdefault

Available inall subroutines.

Looks up the key key in the table id. When the key is present, its associated value will be returned. When the key is absent, the default value is returned. The default value is required.

Example

table t RTIME {
"/a": 1s,
"/b": 1d,
"/c": 1w,
"/d": 1m,
"/e": 1y,
}
set bereq.connect_timeout = table.lookup_rtime(t, req.url.path, 5s);