repository

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 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 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(ctx context.Context, cfg *config.Cache) *Backend

NewBackend creates a new instance of Backend.

func (*Backend) Fetch

func (s *Backend) Fetch(
	rule *config.Rule, 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(
	rule *config.Rule, 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(
		rule *config.Rule, path []byte, query []byte, queryHeaders *[][2][]byte,
	) (
		status int, headers *[][2][]byte, body []byte, releaseFn func(), err error,
	)

	RevalidatorMaker() func(
		rule *config.Rule, 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