Home

Traffic Server Software Developers Kit

INKMgmtIntGet

Get a records.config variable of type int.

Prototype

int INKMgmtIntGet (const char *var_name, INKMgmtInt *result)

Arguments

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.

Description

INKMgmtIntGet obtains the value of the specified records.config variable of type int, and then stores the value in result.

Example

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”);
 
Returns

If INKMgmtIntGet cannot get the variable, then zero is returned.

If successful, then it returns a nonzero value.