base

package
v0.0.0-...-d744151 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_REQ_BODY  = 524288 // 512 KiB
	MAX_RESP_BODY = 524288 // 512 KiB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseLoggerPlugin

type BaseLoggerPlugin struct {
	BasePlugin

	FireChan   chan map[string]any
	AsyncBlock bool

	LogFormat map[string]string

	SendFunc func(log map[string]any)

	IncludeRequestBody  bool
	IncludeResponseBody bool
}

func (*BaseLoggerPlugin) Consume

func (p *BaseLoggerPlugin) Consume()

add a http log consumer here, to consume the log via a channel

func (*BaseLoggerPlugin) Fire

func (p *BaseLoggerPlugin) Fire(entry map[string]any) error

func (*BaseLoggerPlugin) Handler

func (p *BaseLoggerPlugin) Handler(next http.Handler) http.Handler

type BasePlugin

type BasePlugin struct {
	Name     string
	Priority int
	Schema   string
}

func (*BasePlugin) GetName

func (p *BasePlugin) GetName() string

func (*BasePlugin) GetPriority

func (p *BasePlugin) GetPriority() int

func (*BasePlugin) GetSchema

func (p *BasePlugin) GetSchema() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL