Documentation
¶
Index ¶
- Constants
- type Config
- type Handler
- type Middleware
- type Plugin
- func (p *Plugin) AddHandler(name endure.Named, handler Handler)
- func (p *Plugin) AddMiddleware(name endure.Named, middleware Middleware)
- func (p *Plugin) Collects() []any
- func (p *Plugin) Init(cfg config.Configurer, log *zap.Logger) error
- func (p *Plugin) Name() string
- func (p *Plugin) Serve() chan error
- func (p *Plugin) Stop() error
Constants ¶
View Source
const PluginName = "http"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DirCache string `mapstructure:"dir_cache"`
HostWhitelist []string `mapstructure:"host_whitelist"`
CertFile string `mapstructure:"cert_file"`
KeyFile string `mapstructure:"key_file"`
Address string `mapstructure:"address"`
Middleware []string `mapstructure:"middleware"`
MaxHeaderBytes int `mapstructure:"max_header_bytes"`
ReadHeaderTimeout time.Duration `mapstructure:"read_header_timeout"`
ReadTimeout time.Duration `mapstructure:"read_timeout"`
WriteTimeout time.Duration `mapstructure:"write_timeout"`
IdleTimeout time.Duration `mapstructure:"idle_timeout"`
Static []struct {
Dir string `mapstructure:"dir"`
Pattern string `mapstructure:"pattern"`
Methods []string `mapstructure:"methods"`
} `mapstructure:"static"`
}
func (*Config) InitDefault ¶
func (cfg *Config) InitDefault()
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) AddHandler ¶
func (*Plugin) AddMiddleware ¶
func (p *Plugin) AddMiddleware(name endure.Named, middleware Middleware)
Click to show internal directories.
Click to hide internal directories.