Documentation
¶
Index ¶
Constants ¶
View Source
const ( Kind = constant.LLMProxyFilter APIKeyPrefix = "Bearer" LLMUnhealthyKey = "LLMUnhealthy" HealthyCheckTimeKey = "HealthyCheckTime" // Context key to pass attempt data from proxy to downstream filters LLMUpstreamAttemptsKey = "llm_upstream_attempts" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Timeout time.Duration `yaml:"timeout" json:"timeout,omitempty"`
MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns,omitempty"`
MaxIdleConnsPerHost int `yaml:"maxIdleConnsPerHost" json:"maxIdleConnsPerHost,omitempty"`
MaxConnsPerHost int `yaml:"maxConnsPerHost" json:"maxConnsPerHost,omitempty"`
Scheme string `yaml:"scheme" json:"scheme,omitempty" default:"http"`
}
Config describes the top-level configuration for the filter. Note: Strategy-specific configurations are now defined on the endpoints.
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter is the processing entity for each request.
func (*Filter) Decode ¶
func (f *Filter) Decode(hc *contexthttp.HttpContext) filter.FilterStatus
Decode is the main entry point for processing an incoming request.
type FilterFactory ¶
type FilterFactory struct {
// contains filtered or unexported fields
}
FilterFactory creates filter instances.
func (*FilterFactory) Apply ¶
func (factory *FilterFactory) Apply() error
Apply initializes the factory from its configuration.
func (*FilterFactory) Config ¶
func (factory *FilterFactory) Config() any
Config returns the configuration struct for the factory.
func (*FilterFactory) PrepareFilterChain ¶
func (factory *FilterFactory) PrepareFilterChain(_ *contexthttp.HttpContext, chain filter.FilterChain) error
PrepareFilterChain creates a new Filter instance for a request chain.
type Plugin ¶
type Plugin struct{}
Plugin is the main plugin entrypoint.
func (*Plugin) CreateFilterFactory ¶
func (p *Plugin) CreateFilterFactory() (filter.HttpFilterFactory, error)
CreateFilterFactory creates a new factory instance for this filter.
type RequestExecutor ¶
type RequestExecutor struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.