Return array of active functions (rules) for given chain name. It analyzes rules configuration, compiles caches if not exists and returns result. Default chain name is `''` (empty string). It can't be skipped. That's done intentionally, to keep signature monomorphic for high
(self, chainName: str = "")
| 253 | return result |
| 254 | |
| 255 | def getRules(self, chainName: str = "") -> list[RuleFuncTv]: |
| 256 | """Return array of active functions (rules) for given chain name. |
| 257 | It analyzes rules configuration, compiles caches if not exists and returns result. |
| 258 | |
| 259 | Default chain name is `''` (empty string). It can't be skipped. |
| 260 | That's done intentionally, to keep signature monomorphic for high speed. |
| 261 | |
| 262 | """ |
| 263 | if self.__cache__ is None: |
| 264 | self.__compile__() |
| 265 | assert self.__cache__ is not None |
| 266 | # Chain can be empty, if rules disabled. But we still have to return Array. |
| 267 | return self.__cache__.get(chainName, []) or [] |
| 268 | |
| 269 | def get_all_rules(self) -> list[str]: |
| 270 | """Return all available rule names.""" |
no test coverage detected