# Module cloudi_core_i_rate_based_configuration

- Description
- Function Index
- Function Details

### CloudI Rate-Based Configuration

Routines for service request and termination rate-based configuration adjustments.

Copyright © 2013-2020 Michael Truog

Version: 2.0.1 Dec 3 2021 17:15:35 ------------------------------------------------------------------------

Authors: Michael Truog (`mjtruog at protonmail dot com`).

## Description

### CloudI Rate-Based Configuration

Routines for service request and termination rate-based configuration adjustments.

## Function Index

count_process_dynamic_format/1 |
count_process_dynamic_init/1 |
count_process_dynamic_reinit/2 |
count_process_dynamic_request/1 |
count_process_dynamic_terminate/1 |
count_process_dynamic_terminate_set/2 |
count_process_dynamic_terminated/1 |
count_process_dynamic_update/2 |
count_process_dynamic_validate/2 |
hibernate_check/1 |
hibernate_format/1 |
hibernate_init/1 |
hibernate_reinit/1 |
hibernate_request/1 |
hibernate_validate/1 |
rate_request_format/1 |
rate_request_init/1 |
rate_request_reinit/1 |
rate_request_request/1 |
rate_request_validate/1 |
restart_delay_format/1 |
restart_delay_validate/1 |
restart_delay_value/3 |

## Function Details

### count_process_dynamic_format/1

`count_process_dynamic_format(Count_process_dynamic::#count_process_dynamic{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), rate_min = undefined | number(), count_process_max = undefined | pos_integer(), count_process_min = undefined | pos_integer(), terminate = boolean()} | false) -> cloudi_service_api:service_options_count_process_dynamic_options() | false`

### count_process_dynamic_init/1

`count_process_dynamic_init(State::#count_process_dynamic{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), rate_min = undefined | number(), count_process_max = undefined | pos_integer(), count_process_min = undefined | pos_integer(), terminate = boolean()}) -> #count_process_dynamic{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), rate_min = undefined | number(), count_process_max = undefined | pos_integer(), count_process_min = undefined | pos_integer(), terminate = boolean()}`

### count_process_dynamic_reinit/2

`count_process_dynamic_reinit(Dispatcher::pid(), State::#count_process_dynamic{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), rate_min = undefined | number(), count_process_max = undefined | pos_integer(), count_process_min = undefined | pos_integer(), terminate = boolean()}) -> #count_process_dynamic{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), rate_min = undefined | number(), count_process_max = undefined | pos_integer(), count_process_min = undefined | pos_integer(), terminate = boolean()}`

### count_process_dynamic_request/1

`count_process_dynamic_request(State::#count_process_dynamic{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), rate_min = undefined | number(), count_process_max = undefined | pos_integer(), count_process_min = undefined | pos_integer(), terminate = boolean()}) -> #count_process_dynamic{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), rate_min = undefined | number(), count_process_max = undefined | pos_integer(), count_process_min = undefined | pos_integer(), terminate = boolean()}`

### count_process_dynamic_terminate/1

`count_process_dynamic_terminate(Pid::pid()) -> ok`

### count_process_dynamic_terminate_set/2

`count_process_dynamic_terminate_set(ReceiverPid::pid(), State::#count_process_dynamic{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), rate_min = undefined | number(), count_process_max = undefined | pos_integer(), count_process_min = undefined | pos_integer(), terminate = boolean()}) -> #count_process_dynamic{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), rate_min = undefined | number(), count_process_max = undefined | pos_integer(), count_process_min = undefined | pos_integer(), terminate = boolean()}`

### count_process_dynamic_terminated/1

`count_process_dynamic_terminated(State::#count_process_dynamic{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), rate_min = undefined | number(), count_process_max = undefined | pos_integer(), count_process_min = undefined | pos_integer(), terminate = boolean()} | false) -> boolean()`

### count_process_dynamic_update/2

`count_process_dynamic_update(Pid::pid(), CountProcess::pos_integer()) -> ok`

### count_process_dynamic_validate/2

`count_process_dynamic_validate(Options::[{atom(), any()}] | false, CountProcess::number() | undefined) -> {ok, #count_process_dynamic{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), rate_min = undefined | number(), count_process_max = undefined | pos_integer(), count_process_min = undefined | pos_integer(), terminate = boolean()} | false} | {error, {service_options_count_process_dynamic_invalid, any()}}`

### hibernate_check/1

`hibernate_check(Value::#hibernate{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_min = undefined | number(), hibernate = boolean()} | boolean()) -> boolean()`

### hibernate_format/1

`hibernate_format(Hibernate::#hibernate{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_min = undefined | number(), hibernate = boolean()} | boolean()) -> cloudi_service_api:service_options_internal_hibernate_options() | boolean()`

### hibernate_init/1

`hibernate_init(State::#hibernate{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_min = undefined | number(), hibernate = boolean()}) -> #hibernate{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_min = undefined | number(), hibernate = boolean()}`

### hibernate_reinit/1

`hibernate_reinit(State::#hibernate{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_min = undefined | number(), hibernate = boolean()} | boolean()) -> {boolean(), #hibernate{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_min = undefined | number(), hibernate = boolean()} | boolean()}`

### hibernate_request/1

`hibernate_request(State::#hibernate{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_min = undefined | number(), hibernate = boolean()}) -> #hibernate{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_min = undefined | number(), hibernate = boolean()}`

### hibernate_validate/1

`hibernate_validate(Options::[{atom(), any()}] | boolean()) -> {ok, #hibernate{method = undefined | rate_request, period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_min = undefined | number(), hibernate = boolean()} | boolean()} | {error, {service_options_hibernate_invalid, any()}}`

### rate_request_format/1

`rate_request_format(Rate_request::#rate_request{period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), blocking = boolean()} | undefined) -> cloudi_service_api:service_options_rate_request_max_options() | undefined`

### rate_request_init/1

`rate_request_init(State::#rate_request{period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), blocking = boolean()}) -> #rate_request{period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), blocking = boolean()}`

### rate_request_reinit/1

`rate_request_reinit(State::#rate_request{period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), blocking = boolean()} | undefined) -> #rate_request{period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), blocking = boolean()}`

### rate_request_request/1

`rate_request_request(State::#rate_request{period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), blocking = boolean()}) -> {boolean(), #rate_request{period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), blocking = boolean()}}`

### rate_request_validate/1

`rate_request_validate(Value::[{atom(), any()}] | number() | undefined) -> {ok, #rate_request{period = undefined | cloudi_service_api:period_seconds(), count = non_neg_integer(), rate_max = undefined | number(), blocking = boolean()} | undefined} | {error, {service_options_rate_request_max_invalid, any()}}`

### restart_delay_format/1

`restart_delay_format(Restart_delay::#restart_delay{method = undefined | exponential | linear | absolute, time_min = undefined | cloudi_service_api:restart_delay_value_milliseconds(), time_max = undefined | cloudi_service_api:restart_delay_value_milliseconds(), time_slope = undefined | cloudi_service_api:restart_delay_value_milliseconds()} | false) -> cloudi_service_api:service_options_restart_delay_options() | false`

### restart_delay_validate/1

`restart_delay_validate(Options::[{atom(), any()}] | false) -> {ok, #restart_delay{method = undefined | exponential | linear | absolute, time_min = undefined | cloudi_service_api:restart_delay_value_milliseconds(), time_max = undefined | cloudi_service_api:restart_delay_value_milliseconds(), time_slope = undefined | cloudi_service_api:restart_delay_value_milliseconds()} | false} | {error, {service_options_restart_delay_invalid, any()}}`

### restart_delay_value/3

`restart_delay_value(RestartTimes::[cloudi_timestamp:seconds_monotonic()], MaxT::non_neg_integer(), State::#restart_delay{method = undefined | exponential | linear | absolute, time_min = undefined | cloudi_service_api:restart_delay_value_milliseconds(), time_max = undefined | cloudi_service_api:restart_delay_value_milliseconds(), time_slope = undefined | cloudi_service_api:restart_delay_value_milliseconds()} | false) -> false | {NewRestartCount::non_neg_integer(), NewRestartTimes::[cloudi_timestamp:seconds_monotonic()], Value::0..4294967295}`

Generated by EDoc