routers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BotFilter

func BotFilter(ctx *context.Context)

func InitChromeDp

func InitChromeDp()

func Static

func Static(ctx *context.Context)

Types

type PageCache

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

type RenderTask

type RenderTask struct {
	HttpCtx *context.Context
	Url     string
	Render  func(chromeCtx ctx.Context, url string) (string, error)
	Wg      *sync.WaitGroup
}

func NewRenderTask

func NewRenderTask(httpCtx *context.Context, url string, wg *sync.WaitGroup) *RenderTask

type SsrPool

type SsrPool struct {
	TaskChannel      chan *RenderTask
	JobsChannel      chan *RenderTask
	AddWorkerChannel chan bool
	WorkerNum        int
}

func NewSsrPool

func NewSsrPool(cap int) *SsrPool

func (*SsrPool) Run

func (pool *SsrPool) Run()

Jump to

Keyboard shortcuts

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