Documentation
¶
Index ¶
- func ParseList(raw string) []string
- func Register(p Interface)
- type Context
- type Interface
- type Manifest
- type Registry
- func (r *Registry) Apply(ctx context.Context, enabled []string, req *Context) error
- func (r *Registry) Available(handler utils.HandlerType, apiType utils.APIType) []Manifest
- func (r *Registry) Get(name string) (Interface, bool)
- func (r *Registry) Register(p Interface)
- func (r *Registry) Run(ctx context.Context, enabled []string, req *Context) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
Alias string
Origin string
Handler utils.HandlerType
APIType utils.APIType
Stream bool
// contains filtered or unexported fields
}
func NewContext ¶
type Manifest ¶
type Manifest struct {
Name string `json:"name"`
Label string `json:"label"`
Description string `json:"description"`
Handlers []utils.HandlerType `json:"handlers"`
APITypes []utils.APIType `json:"api_types"`
}
func (Manifest) SupportsHandler ¶
func (m Manifest) SupportsHandler(handler utils.HandlerType) bool
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func DefaultRegistry ¶
func DefaultRegistry() *Registry
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) Apply ¶ added in v1.5.0
Apply 依次修改同一个请求 Context,不在插件链结束时强制序列化 调用方可以继续复用 Context 中缓存的最终 AST
Click to show internal directories.
Click to hide internal directories.