add recorder for serial handler
This commit is contained in:
@ -229,6 +229,8 @@ type IngressConfig struct {
|
||||
type RecorderConfig struct {
|
||||
Name string `json:"name"`
|
||||
File *FileRecorder `yaml:",omitempty" json:"file,omitempty"`
|
||||
TCP *TCPRecorder `yaml:"tcp,omitempty" json:"tcp,omitempty"`
|
||||
HTTP *HTTPRecorder `yaml:"http,omitempty" json:"http,omitempty"`
|
||||
Redis *RedisRecorder `yaml:",omitempty" json:"redis,omitempty"`
|
||||
Plugin *PluginConfig `yaml:",omitempty" json:"plugin,omitempty"`
|
||||
}
|
||||
@ -238,6 +240,16 @@ type FileRecorder struct {
|
||||
Sep string `yaml:",omitempty" json:"sep,omitempty"`
|
||||
}
|
||||
|
||||
type TCPRecorder struct {
|
||||
Addr string `json:"addr"`
|
||||
Timeout time.Duration `json:"timeout"`
|
||||
}
|
||||
|
||||
type HTTPRecorder struct {
|
||||
URL string `json:"url" yaml:"url"`
|
||||
Timeout time.Duration `json:"timeout"`
|
||||
}
|
||||
|
||||
type RedisRecorder struct {
|
||||
Addr string `json:"addr"`
|
||||
DB int `yaml:",omitempty" json:"db,omitempty"`
|
||||
@ -247,8 +259,9 @@ type RedisRecorder struct {
|
||||
}
|
||||
|
||||
type RecorderObject struct {
|
||||
Name string `json:"name"`
|
||||
Record string `json:"record"`
|
||||
Name string `json:"name"`
|
||||
Record string `json:"record"`
|
||||
Metadata map[string]any
|
||||
}
|
||||
|
||||
type LimiterConfig struct {
|
||||
|
Reference in New Issue
Block a user