class Athena::Mercure::Hub

Overview

Default implementation of [AMC::Hub::Interface][].

Included Modules

Defined in:

hub/hub.cr
hub/interface.cr

Constructors

Instance Method Summary

Instance methods inherited from module Athena::Mercure::Hub::Interface

public_url : String public_url, publish(update : AMC::Update) : String publish, token_factory : AMC::TokenFactory::Interface | Nil token_factory, token_provider : AMC::TokenProvider::Interface | Nil token_provider, url : String url

Constructor Detail

def self.new(url : String, token_provider : AMC::TokenProvider::Interface, token_factory : AMC::TokenFactory::Interface | Nil = nil, public_url : String | Nil = nil, http_client : HTTP::Client | Nil = nil) #

[View source]

Instance Method Detail

def public_url : String #

Returns the public URL of this hub used to subscribe.


[View source]
def publish(update : AMC::Update) : String #

Publishes the provided update to this hub.


[View source]
def token_factory : AMC::TokenFactory::Interface | Nil #

Returns the [AMC::TokenFactory::Interface][] associated with this hub.


[View source]
def token_provider : AMC::TokenProvider::Interface #

Returns the [AMC::TokenProvider::Interface][] associated with this hub.


[View source]
def url : String #

Returns the internal URL of this hub used to publish updates.


[View source]