PROXY:atomic_counter_destroy(counter_name)
Destroys an atomic counter with a specific name. The creator process has the ownership, and only the owner can destroy the counter. Non-owner calls will be ignored.
Syntax
PROXY:atomic_counter_destroy(counter_name)
Arguments
| Name | Description |
|---|---|
| counter_name |
A Lua string as the name of the counter. This parameter is mandatory. |
Events
All events except: PERSISTENCE, POST_PERSIST.
Example
when HTTP_REQUEST {
counter_name = "DemoCounter1"
ret = PROXY:atomic_counter_destroy(counter_name)
if ret then
debug("===>>atomic_counter_destroy success:[%s]\n",counter_name)
else
debug("===>>atomic_counter_destroy failed:[%s]\n",counter_name)
end
}
Supported Version
FortiADC version 7.6.0 and later.