Class: ActiveStorage::StructuredEventSubscriber
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
ActiveSupport::StructuredEventSubscriber
|
Defined in: | activestorage/lib/active_storage/structured_event_subscriber.rb |
Constant Summary
Class Attribute Summary
::ActiveSupport::StructuredEventSubscriber
- Inherited
::ActiveSupport::Subscriber
- Inherited
Class Method Summary
::ActiveSupport::StructuredEventSubscriber
- Inherited
::ActiveSupport::Subscriber
- Inherited
.attach_to | Attach the subscriber to a namespace. |
.detach_from | Detach the subscriber from a namespace. |
.method_added | Adds event subscribers for all new methods added to the class. |
.new, .subscribers, .add_event_subscriber, .fetch_public_methods, .find_attached_subscriber, .invalid_event?, .pattern_subscribed?, .prepare_pattern, .remove_event_subscriber |
Instance Attribute Summary
::ActiveSupport::StructuredEventSubscriber
- Inherited
::ActiveSupport::Subscriber
- Inherited
Instance Method Summary
- #preview(event)
- #service_delete(event)
- #service_delete_prefixed(event)
- #service_download(event)
- #service_exist(event)
- #service_mirror(event)
- #service_streaming_download(event)
- #service_upload(event)
- #service_url(event)
::ActiveSupport::StructuredEventSubscriber
- Inherited
#call, | |
#emit_debug_event | Like |
#emit_event | Emit a structured event via Rails.event.notify. |
#silenced?, #handle_event_error |
::ActiveSupport::Subscriber
- Inherited
Constructor Details
This class inherits a constructor from ActiveSupport::StructuredEventSubscriber
Instance Method Details
#preview(event)
[ GitHub ]# File 'activestorage/lib/active_storage/structured_event_subscriber.rb', line 26
def preview(event) emit_event("active_storage.preview", key: event.payload[:key], ) end
#service_delete(event)
[ GitHub ]# File 'activestorage/lib/active_storage/structured_event_subscriber.rb', line 32
def service_delete(event) emit_event("active_storage.service_delete", key: event.payload[:key], ) end
#service_delete_prefixed(event)
[ GitHub ]# File 'activestorage/lib/active_storage/structured_event_subscriber.rb', line 38
def service_delete_prefixed(event) emit_event("active_storage.service_delete_prefixed", prefix: event.payload[:prefix], ) end
#service_download(event)
[ GitHub ]# File 'activestorage/lib/active_storage/structured_event_subscriber.rb', line 14
def service_download(event) emit_event("active_storage.service_download", key: event.payload[:key], ) end
#service_exist(event)
[ GitHub ]# File 'activestorage/lib/active_storage/structured_event_subscriber.rb', line 44
def service_exist(event) emit_debug_event("active_storage.service_exist", key: event.payload[:key], exist: event.payload[:exist], ) end
#service_mirror(event)
[ GitHub ]# File 'activestorage/lib/active_storage/structured_event_subscriber.rb', line 60
def service_mirror(event) emit_debug_event("active_storage.service_mirror", key: event.payload[:key], checksum: event.payload[:checksum], ) end
#service_streaming_download(event)
[ GitHub ]# File 'activestorage/lib/active_storage/structured_event_subscriber.rb', line 20
def service_streaming_download(event) emit_event("active_storage.service_streaming_download", key: event.payload[:key], ) end
#service_upload(event)
[ GitHub ]# File 'activestorage/lib/active_storage/structured_event_subscriber.rb', line 7
def service_upload(event) emit_event("active_storage.service_upload", key: event.payload[:key], checksum: event.payload[:checksum], ) end
#service_url(event)
[ GitHub ]# File 'activestorage/lib/active_storage/structured_event_subscriber.rb', line 52
def service_url(event) emit_debug_event("active_storage.service_url", key: event.payload[:key], url: event.payload[:url], ) end