cache

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	Start()
}

App defines the cache application lifecycle interface.

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache encapsulates the entire cache application state, including HTTP server, config, and probes.

func NewApp

func NewApp(ctx context.Context, cfg *config.Config, probe liveness.Prober) (*Cache, error)

NewApp builds a new Cache app, wiring together storage, repo, reader, and server.

func (*Cache) IsAlive

func (c *Cache) IsAlive(_ context.Context) bool

IsAlive is called by liveness probes to check app health. Returns false if the HTTP server is not alive.

func (*Cache) Start

func (c *Cache) Start(gc shutdown.Gracefuller)

Start runs the cache server and liveness probe, and handles graceful shutdown. The Gracefuller interface is expected to call Done() when shutdown is complete.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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