koi_net.components.knowledge_handlers.node_contact_handler
Classes
|
- class koi_net.components.knowledge_handlers.node_contact_handler.NodeContactHandler(log, pipeline, identity, cache, config, kobj_queue, graph, request_handler)[source]
Bases:
KnowledgeHandler- Parameters:
log (Logger)
pipeline (KnowledgePipeline)
identity (NodeIdentity)
cache (Cache)
config (BaseNodeConfig)
kobj_queue (KobjQueue)
graph (NetworkGraph)
request_handler (RequestHandler)
- config: BaseNodeConfig
- graph: NetworkGraph
- handle(kobj)[source]
Makes contact with providers of RID types of interest.
When an incoming node knowledge object is identified as a provider of an RID type of interest, this handler will propose a new edge subscribing to future node events, and fetch existing nodes to catch up to the current state.
- Parameters:
kobj (KnowledgeObject)
- handler_type: HandlerType = 'network'
- identity: NodeIdentity
- request_handler: RequestHandler
- rid_types: tuple[RIDType] = (<RIDType 'orn:koi-net.node'>,)