Class: BSV::Overlay::BroadcastFacilitator

Inherits:
Object
  • Object
show all
Defined in:
lib/bsv/overlay/broadcast_facilitator.rb

Overview

Abstract base class defining the interface for broadcast facilitators.

A facilitator is responsible for sending a TaggedBEEF to a given Overlay Services host URL and returning a parsed STEAK response. Concrete subclasses implement the transport mechanism (e.g. HTTPS).

Implementors must override #send_beef.

Direct Known Subclasses

HTTPSBroadcastFacilitator

Instance Method Summary collapse

Instance Method Details

#send_beef(url, tagged_beef) ⇒ Hash{String => AdmittanceInstructions}?

Send a tagged BEEF to the given overlay host.

Parameters:

  • url (String)

    base URL of the Overlay Services host

  • tagged_beef (TaggedBEEF)

    the tagged BEEF to send

Returns:

Raises:

  • (NotImplementedError)

    always — subclasses must implement this



23
24
25
# File 'lib/bsv/overlay/broadcast_facilitator.rb', line 23

def send_beef(url, tagged_beef)
  raise NotImplementedError, "#{self.class}#send_beef must be implemented"
end