koi_net.components.knowledge_handlers.edge_negotiation_handler
Classes
|
Handles edge negotiation process. |
- class koi_net.components.knowledge_handlers.edge_negotiation_handler.EdgeNegotiationHandler(log, pipeline, identity, cache, event_queue, kobj_queue)[source]
Bases:
KnowledgeHandlerHandles edge negotiation process.
Automatically approves proposed edges if they request RID types this node can provide (or KOI node, edge RIDs). Validates the edge type is allowed for the node type (partial nodes cannot use webhooks). If edge is invalid, a
FORGETevent is sent to the other node.- Parameters:
log (Logger)
pipeline (KnowledgePipeline)
identity (NodeIdentity)
cache (Cache)
event_queue (EventQueue)
kobj_queue (KobjQueue)
- event_queue: EventQueue
- handle(kobj)[source]
- Parameters:
kobj (KnowledgeObject)
- handler_type: HandlerType = 'bundle'
- identity: NodeIdentity
- rid_types: tuple[RIDType] = (<RIDType 'orn:koi-net.edge'>,)