koi_net.components.knowledge_handlers.node_contact_handler

Classes

NodeContactHandler(log, pipeline, identity, ...)

class koi_net.components.knowledge_handlers.node_contact_handler.NodeContactHandler(log, pipeline, identity, cache, config, kobj_queue, graph, request_handler)[source]

Bases: KnowledgeHandler

Parameters:
cache: Cache
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
kobj_queue: KobjQueue
process_node(node_rid, node_bundle)[source]
Parameters:
  • node_rid (KoiNetNode)

  • node_bundle (Bundle)

request_handler: RequestHandler
rid_types: tuple[RIDType] = (<RIDType 'orn:koi-net.node'>,)
start()[source]