refreshpolicy

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package refreshpolicy separates operator cadence from panel safety. A zero wait is permission to schedule, never permission to interrupt BUSY.

Index

Constants

This section is empty.

Variables

View Source
var ErrPolicy = errors.New("refresh policy: invalid metadata or interval")

Functions

This section is empty.

Types

type Mode

type Mode uint8
const (
	Auto Mode = iota
	Partial
	Full
)

type Options

type Options struct {
	Priority Priority
	Mode     Mode
}

Options is bound to one complete scene revision, not to individual chunks.

func Parse

func Parse(priority, mode string) (Options, error)

type Policy

type Policy struct {
	Normal time.Duration
	Urgent time.Duration
}

Policy intervals are operator budgets, not manufacturer safety guarantees. Both must be positive so urgent cannot accidentally mean unlimited refresh.

func (Policy) Wait

func (p Policy) Wait(priority Priority, elapsed time.Duration) (time.Duration, error)

type Priority

type Priority uint8
const (
	Normal Priority = iota
	Urgent
)

Jump to

Keyboard shortcuts

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