Skip to content

Class BSV::Overlay::LookupFacilitator

Inherits: Object

Abstract base class defining the interface for lookup facilitators.

A facilitator is responsible for sending a LookupQuestion to a given Overlay Services host URL and returning a LookupAnswer. Concrete subclasses implement the transport mechanism (e.g. HTTPS, in-process).

Implementors must override #lookup.

Public Instance Methods

lookup(url, question, timeout: = 5)

Send a lookup question to the given host URL. - @param url [String] base URL of the Overlay Services host - @param question [LookupQuestion] the question to ask - @param timeout [Integer] seconds to wait for a response - @raise [NotImplementedError] always — subclasses must implement this - @return [LookupAnswer]