service

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInSlice

func IsInSlice(links []string, link string) bool

func NewService

func NewService(r Repository, prerenderConfig configuration.PrerenderConfig, storageConfig configuration.StorageConfig) *service

Types

type Repository

type Repository interface {
	SaveData(ctx context.Context, pd *models.PageData) error
}

type Service

type Service interface {
	GetLinksForRender() ([]string, error)
	GetUrlsFromSitemaps() ([]string, error)
	GetUrlsFromLinksList() ([]string, error)
	PreparePages(links []string) ([]*models.PageData, error)

	GetPageBody(ctx context.Context, p *models.PageData) error
	RenderPages(ctx context.Context, pages []*models.PageData, maxWorkers int) error
	RenderPage(ctx context.Context, page *models.PageData, num int, total int) error

	PrepareRenderReport(pages []*models.PageData, d time.Duration, procs int) string
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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