Pular para o conteúdo

RenderService

Este conteúdo não está disponível em sua língua ainda.

Internal service that handles batch template rendering. Used by the campaign workflow engine to render Markdown templates into rich message content for each recipient.

MethodDescription
RenderBatchRender a template for multiple users (server-streaming)

Render a template for a batch of users with per-user variable interpolation. Returns results as a server stream — each response contains one rendered message.

Authorization: Internal service only

FieldTypeDescription
template_bodystringMarkdown template content.
usersUserRenderContext[]Per-user rendering contexts.
FieldTypeDescription
user_idstringRecipient user ID.
variablesmap<string, string>Template variable values for this user.

Each streamed response contains one rendered result:

FieldTypeDescription
user_idstringThe user this result is for.
messageMessageThe rendered message content.
errorstringError message if rendering failed for this user.

The render pipeline is designed for future migration to a Rust-based renderer (pidgr-renderer). The current Go implementation handles Markdown processing in-process, but the gRPC interface is structured for cross-service streaming when the Rust renderer is deployed.