Documentation
¶
Index ¶
- type Config
- type Metadata
- type Plugin
- func (p *Plugin) Config() any
- func (p *Plugin) Handler(next http.Handler) http.Handler
- func (p *Plugin) Init() error
- func (p *Plugin) LogCapturePolicy() base.LogCapturePolicy
- func (p *Plugin) PostInit() error
- func (p *Plugin) RunLogPhase(snapshot base.LogSnapshot) error
- func (p *Plugin) Send(entry metricEntry)
- func (p *Plugin) SetRouteContext(routeID string, serverAddr string)
- func (p *Plugin) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
PreferName bool `json:"prefer_name,omitempty"`
IncludePath bool `json:"include_path,omitempty"`
IncludeMethod bool `json:"include_method,omitempty"`
ConstantTags []string `json:"constant_tags,omitempty"`
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
BatchName string `json:"name,omitempty"`
BatchMaxSize int `json:"batch_max_size,omitempty"`
MaxRetryCount int `json:"max_retry_count,omitempty"`
RetryDelay int `json:"retry_delay,omitempty"`
BufferDuration int `json:"buffer_duration,omitempty"`
InactiveTimeout int `json:"inactive_timeout,omitempty"`
// contains filtered or unexported fields
}
func (*Config) UnmarshalJSON ¶
type Plugin ¶
type Plugin struct {
base.BasePlugin
BatchProcessor *logger_batch.Processor
RouteID string
ServerAddr string
// contains filtered or unexported fields
}
func (*Plugin) LogCapturePolicy ¶
func (p *Plugin) LogCapturePolicy() base.LogCapturePolicy
func (*Plugin) RunLogPhase ¶
func (p *Plugin) RunLogPhase(snapshot base.LogSnapshot) error
RunLogPhase emits the detached metric snapshot without consulting a live request or response writer. The metric payload intentionally mirrors the legacy Handler fields.
func (*Plugin) SetRouteContext ¶
Click to show internal directories.
Click to hide internal directories.