single

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: GPL-3.0 Imports: 2 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Single)

Option 配置项

func WithKeyFn

func WithKeyFn(fn func(ctx *zero.Ctx) interface{}) Option

WithKeyFn 指定反并发的 Key

func WithPostFn

func WithPostFn(fn func(ctx *zero.Ctx)) Option

WithPostFn 指定反并发拦截后的操作

type Single

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

Single 反并发

func New

func New(op ...Option) *Single

New 创建反并发中间件

func (*Single) Apply

func (s *Single) Apply(engine *zero.Engine)

Apply 为指定 Engine 添加反并发功能

Jump to

Keyboard shortcuts

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