Module: Exa
- Defined in:
- lib/exa.rb,
lib/exa/client.rb,
lib/exa/errors.rb,
lib/exa/errors.rb,
lib/exa/version.rb,
lib/exa/cli/root.rb,
lib/exa/types/base.rb,
lib/exa/types/enums.rb,
lib/exa/types/answer.rb,
lib/exa/types/schema.rb,
lib/exa/types/search.rb,
lib/exa/internal/util.rb,
lib/exa/cli/formatters.rb,
lib/exa/resources/base.rb,
lib/exa/responses/cost.rb,
lib/exa/types/contents.rb,
lib/exa/types/research.rb,
lib/exa/instrumentation.rb,
lib/exa/cli/config_store.rb,
lib/exa/resources/events.rb,
lib/exa/resources/search.rb,
lib/exa/responses/result.rb,
lib/exa/resources/imports.rb,
lib/exa/resources/websets.rb,
lib/exa/responses/helpers.rb,
lib/exa/resources/research.rb,
lib/exa/resources/webhooks.rb,
lib/exa/types/find_similar.rb,
lib/exa/cli/account_resolver.rb,
lib/exa/instrumentation/events.rb,
lib/exa/responses/raw_response.rb,
lib/exa/resources/websets/items.rb,
lib/exa/responses/event_response.rb,
lib/exa/internal/transport/stream.rb,
lib/exa/responses/answer_response.rb,
lib/exa/responses/import_response.rb,
lib/exa/responses/search_response.rb,
lib/exa/responses/webset_response.rb,
lib/exa/resources/websets/monitors.rb,
lib/exa/responses/monitor_response.rb,
lib/exa/responses/webhook_response.rb,
lib/exa/responses/contents_response.rb,
lib/exa/responses/research_response.rb,
lib/exa/instrumentation/cost_tracker.rb,
lib/exa/resources/websets/enrichments.rb,
lib/exa/internal/transport/base_client.rb,
lib/exa/internal/transport/async_requester.rb,
lib/exa/internal/transport/pooled_net_requester.rb
Defined Under Namespace
Modules: CLI, Errors, Instrumentation, Internal, Resources, Responses, Types Classes: Client
Constant Summary collapse
Class Method Summary collapse
-
.emit(event_name, payload) ⇒ Object
Emit an event to all subscribers.
-
.instrumentation ⇒ Exa::Instrumentation::EventRegistry
Returns the global instrumentation event registry.
Class Method Details
.emit(event_name, payload) ⇒ Object
Emit an event to all subscribers. Primarily used internally by the transport layer.
37 38 39 |
# File 'lib/exa.rb', line 37 def emit(event_name, payload) instrumentation.notify(event_name, payload) end |
.instrumentation ⇒ Exa::Instrumentation::EventRegistry
Returns the global instrumentation event registry. Use this to subscribe to API events for cost tracking, logging, etc.
28 29 30 |
# File 'lib/exa.rb', line 28 def instrumentation @instrumentation ||= Instrumentation::EventRegistry.new end |