repository

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend implements the Backender interface. It fetches and constructs SEO page data responses from an external backend.

func NewBackend

func NewBackend(cfg *config.Cache) *Backend

NewBackend creates a new instance of Backend.

func (*Backend) Fetch

func (s *Backend) Fetch(
	path []byte, query []byte, queryHeaders [][2][]byte,
) (
	status int, headers [][2][]byte, body []byte, releaseFn func(), err error,
)

func (*Backend) RevalidatorMaker

func (s *Backend) RevalidatorMaker() func(
	path []byte, query []byte, queryHeaders [][2][]byte,
) (
	status int, headers [][2][]byte, body []byte, releaseFn func(), err error,
)

RevalidatorMaker builds a new revalidator for model.Response by catching a request into closure for be able to call backend later.

type Backender

type Backender interface {
	Fetch(
		path []byte, query []byte, queryHeaders [][2][]byte,
	) (
		status int, headers [][2][]byte, body []byte, releaseFn func(), err error,
	)

	RevalidatorMaker() func(
		path []byte, query []byte, queryHeaders [][2][]byte,
	) (
		status int, headers [][2][]byte, body []byte, releaseFn func(), err error,
	)
}

Backender defines the interface for a repository that provides SEO page data.

Jump to

Keyboard shortcuts

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