api

package
v0.8.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CacheGetPath = "/{any:*}"

CacheGetPath for getting pagedata from cache via HTTP.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheController

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

CacheController handles cache API requests (read/write-through, error reporting, metrics).

func NewCacheController

func NewCacheController(
	ctx context.Context,
	cfg *config.Config,
	cache storage.Storage,
	backend repository.Backender,
) *CacheController

NewCacheController builds a cache API controller with all dependencies. If debug is enabled, launches internal stats logger goroutine.

func (*CacheController) AddRoute

func (c *CacheController) AddRoute(router *router.Router)

AddRoute attaches controller's route(s) to the provided router.

func (*CacheController) Index

func (c *CacheController) Index(r *fasthttp.RequestCtx)

Index is the main HTTP handler for /api/v1/cache.

Jump to

Keyboard shortcuts

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