View Source speed_trap_template (speed_trap v1.1.1)
Summary
Types
-type bucket_id_pattern() :: term().
-type id() :: term().
-type id_pattern() :: {bucket_id_pattern(), id()}.
-type templates() :: #{id() => speed_trap:options()}.
Functions
-spec cleanup() -> ok.
-spec current_id_patterns() -> [id_pattern()].
-spec current_templates() -> templates().
-spec init() -> ok | {error, term()}.
-spec init(#{id() => speed_trap:options()}, [id_pattern()]) -> ok | {error, term()}.
-spec options_from_id(speed_trap:id()) -> {ok, speed_trap_template:id(), speed_trap:options()} | not_found.