Liking cljdoc? Tell your friends :D

hive-system.pattern.registry

Engine and named-pattern registries — the DIP swap points.

Two open sets, two registries:

engines id -> IPatternEngine ;; how to match patterns id -> Pattern ;; what to look for

A consumer names a pattern (:audit/readiness-probe) instead of carrying a literal expression, so one definition serves every call site and a fix lands in one place. resolve-pattern is PURE — the index is an argument, which is what makes it testable and what lets a caller run against a private index.

Engine and named-pattern registries — the DIP swap points.

Two open sets, two registries:

  engines   id -> IPatternEngine   ;; how to match
  patterns  id -> Pattern          ;; what to look for

A consumer names a pattern (`:audit/readiness-probe`) instead of carrying a
literal expression, so one definition serves every call site and a fix lands
in one place. `resolve-pattern` is PURE — the index is an argument, which is
what makes it testable and what lets a caller run against a private index.
raw docstring

engineclj/s

(engine id)

Result<IPatternEngine> for ID.

Result<IPatternEngine> for ID.
sourceraw docstring

patternclj/s

(pattern ref)

Result<Pattern> for REF against the live index.

Result<Pattern> for REF against the live index.
sourceraw docstring

register-engine!clj/s

(register-engine! engine)

Register ENGINE under its engine-id, replacing any prior one. Returns it.

Register ENGINE under its engine-id, replacing any prior one. Returns it.
sourceraw docstring

register-pattern!clj/s

(register-pattern! pattern)

Validate PATTERN and register it under its :pattern/id. Returns Result<Pattern>. An invalid pattern is refused, never stored.

Validate PATTERN and register it under its :pattern/id.
Returns Result<Pattern>. An invalid pattern is refused, never stored.
sourceraw docstring

registered-enginesclj/s

(registered-engines)

Snapshot of {engine-id -> IPatternEngine}.

Snapshot of {engine-id -> IPatternEngine}.
sourceraw docstring

registered-patternsclj/s

(registered-patterns)

Snapshot of {pattern-id -> Pattern}.

Snapshot of {pattern-id -> Pattern}.
sourceraw docstring

resolve-patternclj/s

(resolve-pattern index ref)

PURE. Result<Pattern> for REF against INDEX: an inline Pattern resolves to itself, a keyword to its registration.

PURE. Result<Pattern> for REF against INDEX: an inline Pattern resolves to
itself, a keyword to its registration.
sourceraw docstring

unregister-engine!clj/s

(unregister-engine! id)

Drop the engine registered under ID. Returns it, or nil.

Drop the engine registered under ID. Returns it, or nil.
sourceraw docstring

unregister-pattern!clj/s

(unregister-pattern! id)

Drop the pattern registered under ID. Returns it, or nil.

Drop the pattern registered under ID. Returns it, or nil.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close