跳转到内容

RenderService

此内容尚不支持你的语言。

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

Method Description
RenderBatch Render 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

Field Type Description
template_body string Markdown template content.
users UserRenderContext[] Per-user rendering contexts.
Field Type Description
user_id string Recipient user ID.
variables map<string, string> Template variable values for this user.

Each streamed response contains one rendered result:

Field Type Description
user_id string The user this result is for.
message Message The rendered message content.
error string Error 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.