Documentation
¶
Overview ¶
Package rendering defines render artifact policies and retention rules.
Index ¶
- Constants
- func ExpiresAtForRetention(now time.Time, retentionDays int) time.Time
- func RenderArtifactID(policyVersion, normalizedURL string) string
- func RenderArtifactIDForInstance(policyVersion, instanceSlug, normalizedURL string) string
- func RetentionForClass(class string) (days int, classOut string)
- func SnapshotObjectKey(renderID string) string
- func ThumbnailObjectKey(renderID string) string
- type RenderJobMessage
Constants ¶
const (
RenderPolicyVersion = "v1"
)
RenderPolicyVersion is the current version string used when generating render artifact IDs.
Variables ¶
This section is empty.
Functions ¶
func ExpiresAtForRetention ¶
ExpiresAtForRetention returns an expiry time given a start time and retention in days.
func RenderArtifactID ¶
RenderArtifactID deterministically derives a render artifact ID from policy version and normalized URL.
func RenderArtifactIDForInstance ¶
RenderArtifactIDForInstance deterministically derives a render artifact ID scoped to an instance slug.
func RetentionForClass ¶
RetentionForClass returns retention days and normalized class for a retention class input.
func SnapshotObjectKey ¶
SnapshotObjectKey returns the S3 object key for a render snapshot.
func ThumbnailObjectKey ¶
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.