taolib.testing.file_storage.events.publisher#

事件发布器。

通过 Redis PubSub 发布文件存储事件。

Attributes#

Classes#

StorageEventPublisher

文件存储事件发布器。

Module Contents#

taolib.testing.file_storage.events.publisher.logger#
class taolib.testing.file_storage.events.publisher.StorageEventPublisher(redis_client: Any | None = None)#

文件存储事件发布器。

CHANNEL_PREFIX = 'storage'#
_redis = None#
async publish(event_type: str, event_data: dict) None#

发布事件。

参数:
  • event_type -- 事件类型(如 'file.uploaded')

  • event_data -- 事件数据字典

async publish_file_uploaded(event) None#

发布文件上传事件。

async publish_file_deleted(event) None#

发布文件删除事件。

async publish_upload_completed(event) None#

发布上传完成事件。

async publish_bucket_created(event) None#

发布存储桶创建事件。