cache

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package cache provides simple file-backed caching for flow.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveStatus

func SaveStatus(path string, c StatusCache) error

SaveStatus writes the status cache to disk as JSON.

Types

type StatusCache

type StatusCache map[string]StatusEntry

StatusCache maps workspace IDs to their cached status.

func LoadStatus

func LoadStatus(path string) StatusCache

LoadStatus reads the status cache from disk. Returns an empty cache if the file doesn't exist or can't be parsed.

type StatusEntry

type StatusEntry struct {
	Status     string    `json:"status"`
	ResolvedAt time.Time `json:"resolved_at"`
}

StatusEntry holds a cached status for a single workspace.

Jump to

Keyboard shortcuts

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