Get a records.config
variable of type
int
.
int INKMgmtIntGet (const char *var_name, INKMgmtInt
*result)
var_name
is the name of the variable you want
from records.config
.
result
is a pointer to the variable's value, which is of type INKMgmtInt
.
INKMgmtIntGet
obtains the value of
the specified records.config
variable of
type int
, and then stores the value in
result
.
The following code fragment does something if keepalive is enabled on Traffic Server:
INKMgmtInt result; if (INKMgmtIntGet(“proxy.config.http.keep_alive_enabled“, &result)) { if (result){ // keepalive is enabled, do something } } else INKError (“could not retrieve value\n”);
If INKMgmtIntGet
cannot get the
variable, then zero is returned.
If successful, then it returns a nonzero value.