Documentation
¶
Index ¶
- type Config
- type Plugin
- func (p *Plugin) Config() any
- func (p *Plugin) Handler(next http.Handler) http.Handler
- func (p *Plugin) Init() error
- func (p *Plugin) PostInit() error
- func (p *Plugin) RunLogPhase(snapshot base.LogSnapshot) error
- func (p *Plugin) Send(log map[string]any)
- func (p *Plugin) SendBatch(ctx context.Context, entries []map[string]any, batchMaxSize int) (int, error)
- func (p *Plugin) SetResourceContext(route resource.Route, _ resource.Service)
- 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 {
URI string `json:"uri"`
AuthHeader *string `json:"auth_header,omitempty"`
Timeout int `json:"timeout"`
LogFormat map[string]any `json:"log_format,omitempty"`
SslVerify bool `json:"ssl_verify"`
MaxReqBodyBytes int `json:"max_req_body_bytes,omitempty"`
MaxRespBodyBytes int `json:"max_resp_body_bytes,omitempty"`
IncludeReqBody bool `json:"include_req_body,omitempty"`
IncludeReqBodyExpr []any `json:"include_req_body_expr,omitempty"`
IncludeRespBody bool `json:"include_resp_body,omitempty"`
IncludeRespBodyExpr []any `json:"include_resp_body_expr,omitempty"`
// NOTE: not needed
ConcatMethod string `json:"concat_method"`
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"`
MaxPendingEntries int `json:"max_pending_entries,omitempty"`
// contains filtered or unexported fields
}
func (*Config) UnmarshalJSON ¶
type Plugin ¶
type Plugin struct {
base.BaseLoggerPlugin
// contains filtered or unexported fields
}
func (*Plugin) RunLogPhase ¶
func (p *Plugin) RunLogPhase(snapshot base.LogSnapshot) error
func (*Plugin) SetResourceContext ¶
Click to show internal directories.
Click to hide internal directories.