Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogRetrieval ¶
func LogRetrieval() gin.HandlerFunc
LogRetrieval retrieves a middleware function that checks the logging config and when set expects to find a log record in the context from where to retrieve and parse logs. It reads LOG_PROVIDERS configuration to determine how to query each logging backend.
func SetLoggingConfig ¶ added in v1.19.0
func SetLoggingConfig() gin.HandlerFunc
SetLoggingConfig reads the logging configuration and sets both headers and providers in the context.
Types ¶
type ApiEndpoint ¶ added in v1.19.0
type ApiEndpoint struct {
Reverse bool `yaml:"reverse"`
Path string `yaml:"path"`
Method string `yaml:"method"`
Params map[string]interface{} `yaml:"params"`
Body map[string]interface{} `yaml:"body"`
JsonPath string `yaml:"json-path"`
Pagination *PaginationConfig `yaml:"pagination"`
Timeout string `yaml:"timeout"` // Request timeout as a duration string (e.g. "60s", "5m"). Defaults to 60s.
}
ApiEndpoint defines how to query a logging backend
type PaginationConfig ¶ added in v1.20.0
type PaginationConfig struct {
NextCursor string `yaml:"next-cursor"` // JSONPath to extract cursor values from the response (last match is used)
Param string `yaml:"param"` // Query parameter to update with the cursor value
CursorIncrement int64 `yaml:"cursor-increment"` // Optional increment to apply to integer cursor values
}
PaginationConfig defines how to paginate through a logging backend's responses.
type ProviderConfig ¶ added in v1.19.0
type ProviderConfig struct {
Tail *ApiEndpoint `yaml:"tail"`
Full *ApiEndpoint `yaml:"full"`
}
ProviderConfig defines the tail and full strategies for a log provider
Click to show internal directories.
Click to hide internal directories.