macula_rpc_names (macula v0.14.3)
View SourceName validation and utilities for RPC procedures. Uses reverse DNS notation: org.domain.service.procedure
Summary
Functions
Check if name matches pattern. For now, only exact matching (no wildcards). Future: Could add wildcard patterns if needed.
Extract namespace (first segment).
Normalize name (lowercase, trim, remove double dots).
Count number of segments in name.
Validate RPC procedure name syntax. Valid names: - Non-empty - Segments separated by dots - Segments contain alphanumeric, underscore, hyphen - No leading or trailing dots - No double dots - No wildcards allowed (unlike topics)
Types
-type name() :: binary().
Functions
Check if name matches pattern. For now, only exact matching (no wildcards). Future: Could add wildcard patterns if needed.
Extract namespace (first segment).
Normalize name (lowercase, trim, remove double dots).
-spec segment_count(name()) -> non_neg_integer().
Count number of segments in name.
-spec validate(name()) -> ok | {error, invalid_name}.
Validate RPC procedure name syntax. Valid names: - Non-empty - Segments separated by dots - Segments contain alphanumeric, underscore, hyphen - No leading or trailing dots - No double dots - No wildcards allowed (unlike topics)