reductstore_agent.attachment module

Attachment handling logic.

class reductstore_agent.attachment.AttachmentHandler(bucket, pipeline_name, logger=None)

Bases: object

Class to handle attachments.

ROS_ATTACHMENT_NAME = '$ros'
ROS_ENCODING = 'cdr'
build_ros_payload(topic: str, schema: str, schema_name: str | None = None) dict

Build and cache metadata payload for ‘$ros’ attachment.

async ensure_ros_attachment(entry_name: str, topic: str, schema: str, schema_name: str | None = None) None

Upload ‘$ros’ attachment for this entry, overwriting any existing value.

schema_base64_converter(schema: str) str

Convert schema to base64 for unambiguous transport.

schema_converter(schema: str) str | None

Convert schema to readable UTF-8 text when possible.

async upload_attachments(entry_name: str, attachments: dict[str, Any])

Upload attachment(s) to ReductStore.