Scenic.PubSub.fetch

You're seeing just the function fetch, go back to Scenic.PubSub module for more information.

Specs

fetch(source_id :: atom()) :: {:ok, any()} | {:error, :not_found}

Retrieve the cached data for a named data source.

This data is pulled from an :ets table and does not put load on the data source itself.

Parameters

  • source_id an atom that is registered to a data source.

Return Value

  {:ok, {source_id, data, timestamp}}
  • source_id is the atom representing the data source.
  • data source_id whatever data the data source last published.
  • timestamp is the time - from :os.system_time(:micro_seconds) - the last data was published.

If the data source is either not registered, or has not yet published any data, get returns

  {:error, :no_data}