コード例 #1
0
    def __init__(self) -> None:
        super().__init__()
        self._data: Dict[HostKey, HostSections] = {}

        # This holds the result of the parsing of individual raw sections (by raw section name)
        self._memoized_parsing_results = caching.DictCache()
        # This holds the result of the superseding section along with the
        # cache info of the raw section that was used (by parsed section name!)
        self._memoized_parsed_sections = caching.DictCache()
コード例 #2
0
    def __init__(
        self,
        data: Mapping[HostKey, SectionsParser],
    ) -> None:
        super().__init__()
        # TODO: rename _data (coming soon!)
        self._data: Final = data

        # This holds the result of the superseding section along with the
        # cache info of the raw section that was used (by parsed section name!)
        self._memoized_parsed_sections = caching.DictCache()
コード例 #3
0
ファイル: data_provider.py プロジェクト: miczone/checkmk
    def __init__(
        self,
        data: Mapping[HostKey, HostSections],
    ) -> None:
        super().__init__()
        # TODO: rename _data
        self._data = {
            host_key: SectionsParser(host_sections=host_sections)
            for host_key, host_sections in data.items()
        }

        # This holds the result of the superseding section along with the
        # cache info of the raw section that was used (by parsed section name!)
        self._memoized_parsed_sections = caching.DictCache()
コード例 #4
0
ファイル: host_sections.py プロジェクト: maxmalysh/checkmk
 def __init__(self, parsed_sections_broker: ParsedSectionsBroker) -> None:
     super().__init__()
     self._parsed_sections_broker = parsed_sections_broker
     self._section_content_cache = caching.DictCache()