api

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: 18 Imported by: 0

Documentation

Index

Constants

View Source
const CacheGetPath = "/api/v1/cache/pagedata"

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,
	seoRepo repository.Seo,
	reader synced.PooledReader,
) *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/pagedata.

type LivenessController added in v0.7.0

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

func NewLivenessController added in v0.7.0

func NewLivenessController(probe liveness.Prober) *LivenessController

func (*LivenessController) AddRoute added in v0.7.0

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

func (*LivenessController) Probe added in v0.7.0

func (c *LivenessController) Probe(ctx *fasthttp.RequestCtx)

Jump to

Keyboard shortcuts

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