OpenrelikWorkerCommon.Reporting.Priority (openrelik_worker_common v0.1.0)

Copy Markdown View Source

Reporting priority enum to store common values (IntEnum equivalent).

Priorities can be anything in the range of 0-100, where 100 is the highest priority.

Summary

Functions

Returns 80 (Priority.CRITICAL).

Returns 40 (Priority.HIGH).

Returns 5 (Priority.INFO).

Returns 10 (Priority.LOW).

Returns 20 (Priority.MEDIUM).

Converts a priority atom or integer into its integer value.

Types

t()

@type t() :: integer() | atom()

Functions

critical()

@spec critical() :: integer()

Returns 80 (Priority.CRITICAL).

high()

@spec high() :: integer()

Returns 40 (Priority.HIGH).

info()

@spec info() :: integer()

Returns 5 (Priority.INFO).

low()

@spec low() :: integer()

Returns 10 (Priority.LOW).

medium()

@spec medium() :: integer()

Returns 20 (Priority.MEDIUM).

value(v)

@spec value(t()) :: integer()

Converts a priority atom or integer into its integer value.