MCPcopy
hub / github.com/apache/caldera / _load_wrapper

Method _load_wrapper

app/utility/base_knowledge_svc.py:310–321  ·  view source on GitHub ↗

Support wrapper to process different object types during load :param key: type of object to load :return: function handle to the correct loader function for the associated object type

(self, key)

Source from the content-addressed store, hash-verified

308 self.log.debug('Restored data from persistent storage')
309
310 def _load_wrapper(self, key):
311 """
312 Support wrapper to process different object types during load
313 :param key: type of object to load
314 :return: function handle to the correct loader function for the associated object type
315 """
316 if key == 'facts':
317 return self._add_fact
318 elif key == 'relationships':
319 return self._add_relationship
320 elif key == 'rules':
321 return self._add_rule
322
323 async def _apply_restrictions(self, complete_list, restrictions):
324 """

Callers 1

_restore_stateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected