Documentation
¶
Overview ¶
Package driver is the co-hosted Background Driver: it runs INSIDE the Local Runtime process (holding the same single store-writer lock — never a second opener) and periodically drives the governed Tick, drains projection invalidations, and re-projects the host's managed definition files. It is the only place re-projection lives, so the runtime never imports hostsurface (the locked boundary).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver drives one runtime's background duties. reproject is invoked only when a Tick actually drained an invalidation (it is nil for a runtime with no host projection).
func ForHost ¶
func ForHost(rt *runtime.Runtime, pc hostsurface.ProjectContext, interval time.Duration) *Driver
ForHost builds a Driver whose re-projection refreshes the host's managed definition files via hostsurface.ReProject (the no-clobber path). Re-projection lives here, in the driver, so the runtime never imports hostsurface.
func New ¶
func New(rt *runtime.Runtime, reproject func(refs []contract.ResourceRef) error, interval time.Duration) *Driver
New builds a Driver over rt with an injected re-projection callback (the host-free seam used by tests). interval <= 0 defaults to one second.