SuperWorker.Supervisor.Constants.Validation (SuperWorker v0.3.6)

View Source

Provides validation functions for various constants and parameters in the SuperWorker system.

Summary

Functions

Calculates the default number of partitions based on the number of online schedulers.

Default queue length for chains.

Maximum queue length for chains.

Minimum queue length for chains.

Validates if a given queue length is within the allowed range.

Validates if a given restart strategy is valid for a specific worker type.

Validates if a given send type is valid for chains.

Validates if a given shutdown type is valid.

Validates if a given worker type is valid.

Functions

default_partitions()

@spec default_partitions() :: pos_integer()

Calculates the default number of partitions based on the number of online schedulers.

default_queue_length()

@spec default_queue_length() :: non_neg_integer()

Default queue length for chains.

max_queue_length()

@spec max_queue_length() :: non_neg_integer()

Maximum queue length for chains.

min_queue_length()

@spec min_queue_length() :: non_neg_integer()

Minimum queue length for chains.

valid_queue_length?(length)

@spec valid_queue_length?(integer()) :: boolean()

Validates if a given queue length is within the allowed range.

valid_restart_strategy?(strategy, arg2)

@spec valid_restart_strategy?(atom(), :group | :chain | :standalone) :: boolean()

Validates if a given restart strategy is valid for a specific worker type.

valid_send_type?(send_type)

@spec valid_send_type?(atom()) :: boolean()

Validates if a given send type is valid for chains.

valid_shutdown_type?(type)

@spec valid_shutdown_type?(atom()) :: boolean()

Validates if a given shutdown type is valid.

valid_worker_type?(type)

@spec valid_worker_type?(atom()) :: boolean()

Validates if a given worker type is valid.