service

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 16 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

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(pages []*models.PageData, maxWorkers int) error
	RenderPage(ctx context.Context, page *models.PageData, num int) error

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

func NewService

func NewService(r Repository, prerenderConfig cfg.PrerenderConfig, storageConfig cfg.StorageConfig) Service

Jump to

Keyboard shortcuts

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