rendering

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package rendering defines render artifact policies and retention rules.

Index

Constants

View Source
const (
	RenderPolicyVersion = "v1"
)

RenderPolicyVersion is the current version string used when generating render artifact IDs.

Variables

This section is empty.

Functions

func ExpiresAtForRetention

func ExpiresAtForRetention(now time.Time, retentionDays int) time.Time

ExpiresAtForRetention returns an expiry time given a start time and retention in days.

func RenderArtifactID

func RenderArtifactID(policyVersion, normalizedURL string) string

RenderArtifactID deterministically derives a render artifact ID from policy version and normalized URL.

func RenderArtifactIDForInstance

func RenderArtifactIDForInstance(policyVersion, instanceSlug, normalizedURL string) string

RenderArtifactIDForInstance deterministically derives a render artifact ID scoped to an instance slug.

func RetentionForClass

func RetentionForClass(class string) (days int, classOut string)

RetentionForClass returns retention days and normalized class for a retention class input.

func SnapshotObjectKey

func SnapshotObjectKey(renderID string) string

SnapshotObjectKey returns the S3 object key for a render snapshot.

func ThumbnailObjectKey

func ThumbnailObjectKey(renderID string) string

ThumbnailObjectKey returns the S3 object key for a render thumbnail.

Types

type RenderJobMessage

type RenderJobMessage struct {
	Kind          string `json:"kind"` // "render"
	RenderID      string `json:"render_id"`
	NormalizedURL string `json:"normalized_url"`

	RetentionClass string `json:"retention_class,omitempty"`
	RetentionDays  int    `json:"retention_days,omitempty"`

	RequestedBy string `json:"requested_by,omitempty"`
	RequestID   string `json:"request_id,omitempty"`
}

RenderJobMessage is the payload sent to the render worker queue.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL