Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessLogEntry ¶
type AccessLogEntry struct {
Method string `json:"method"` // HTTP method (GET, POST, etc.)
Path string `json:"path"` // Request path
StatusCode int `json:"status_code"` // HTTP status code
Duration float64 `json:"duration_ms"` // Response time in milliseconds
BytesOut int64 `json:"bytes_out"` // Response size
ClientIP string `json:"client_ip"` // Client IP address
UserAgent string `json:"user_agent"` // User agent string
Referrer string `json:"referrer"` // HTTP referrer
Host string `json:"host"` // Request host/domain
Protocol string `json:"protocol"` // HTTP/HTTPS
RouterName string `json:"router_name"` // Traefik router name
ServiceName string `json:"service_name"` // Traefik service name
DownstreamIP string `json:"downstream_ip"` // Original client IP (behind proxy)
}
AccessLogEntry represents Traefik access log details
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector handles log collection from services
func NewCollector ¶
NewCollector creates a new log collector
func (*Collector) GetAccessLogs ¶
GetAccessLogs fetches recent access logs for a project
func (*Collector) GetContainerLogs ¶
GetContainerLogs fetches recent container logs for a service
type LogEntry ¶
type LogEntry struct {
Timestamp time.Time `json:"timestamp"`
Source string `json:"source"` // "container" or "access"
Project string `json:"project"` // Project name
Service string `json:"service"` // Service name
Server string `json:"server"` // Server name
Message string `json:"message"` // Raw log message (for container logs)
Level string `json:"level"` // Log level (INFO, ERROR, etc.)
AccessLog *AccessLogEntry `json:"access_log"` // Access log details (if source=access)
ContainerID string `json:"container_id"`
Tags map[string]string `json:"tags"` // Additional metadata
}
LogEntry represents a unified log entry (container or access log)
Click to show internal directories.
Click to hide internal directories.