vicg

package
v2.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultVicgFactory

func DefaultVicgFactory(logger logger.Logger, factory map[string]VicgPluginFactory) gin.VicgFactory

DefaultFactory 创建默认的代理工厂.

Types

type Infra added in v2.0.8

type Infra struct {
	ExtraConfig map[string]interface{}
}

Infra 用户自定义结构示例.

type VicgPlugin

type VicgPlugin interface {
	HandleHTTPMessage(ctx context.Context, request *proxy.Request, response *proxy.Response) error
	Priority() int
}

VicgPlugin 插件接口定义.

type VicgPluginFactory

type VicgPluginFactory interface {
	New(cfg *config.PluginConfig, infra interface{}) (VicgPlugin, error)
}

VicgPluginFactory 插件工厂.

Jump to

Keyboard shortcuts

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