imageupdate

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package imageupdate periodically asks the control plane to check each opted-in app's image tag against its registry and redeploy when it moved.

Index

Constants

View Source
const DefaultInterval = time.Hour

DefaultInterval is how often opted-in apps are checked. Hourly: registries rate-limit anonymous digest lookups, and a tag rarely moves faster.

View Source
const EnvInterval = "APP_IMAGE_UPDATE_INTERVAL"

EnvInterval overrides DefaultInterval (a Go duration such as "30m").

Variables

This section is empty.

Functions

func IntervalFromEnv

func IntervalFromEnv(logger *slog.Logger) time.Duration

IntervalFromEnv returns EnvInterval as a duration, else DefaultInterval.

Types

type Checker

type Checker interface {
	CheckImageUpdate(ctx context.Context, serviceName string) (string, error)
}

Checker runs one app's update check; *api.Router satisfies it.

type Scheduler

type Scheduler struct {
	Store   Store
	Checker Checker
	Logger  *slog.Logger
}

Scheduler checks every opted-in app once per Tick.

func (*Scheduler) Run

func (s *Scheduler) Run(ctx context.Context, interval time.Duration) error

Run ticks on interval until ctx is done.

func (*Scheduler) Tick

func (s *Scheduler) Tick(ctx context.Context) error

Tick checks each opted-in app; one app's failure never stops the rest.

type Store

type Store interface {
	ListEnabledImageAutoUpdates(ctx context.Context) ([]store.ImageAutoUpdate, error)
}

Store lists the apps that opted in.

Jump to

Keyboard shortcuts

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