Documentation ¶
Index ¶
Constants ¶
const TimeFormat = "2006-01-02T15:04:05Z"
Variables ¶
This section is empty.
Functions ¶
func GetEvents ¶ added in v0.5.7
func GetEvents(clusterMgr *cluster.ClusterManager, c *server.CompletedConfig) http.HandlerFunc
GetEvents returns an HTTP handler function that streams events for a resource using SSE
@Summary Stream resource events using Server-Sent Events @Description This endpoint streams resource events in real-time using SSE. It supports event type filtering and automatic updates. @Tags insight @Produce text/event-stream @Param cluster path string true "The cluster name" @Param namespace path string true "The namespace name" @Param name path string true "The resource name" @Param kind query string true "The resource kind" @Param apiVersion query string true "The resource API version" @Param type query string false "Event type filter (Normal or Warning)" @Success 200 {array} Event @Failure 400 {object} ErrorResponse @Failure 401 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Router /insight/aggregator/event/{cluster}/{namespace}/{name} [get]
func GetPodLogs ¶
func GetPodLogs(clusterMgr *cluster.ClusterManager, c *server.CompletedConfig) http.HandlerFunc
GetPodLogs returns an HTTP handler function that streams Pod logs using Server-Sent Events
@Summary Stream pod logs using Server-Sent Events @Description This endpoint streams pod logs in real-time using SSE. It supports container selection and automatic reconnection. @Tags insight @Produce text/event-stream @Param cluster path string true "The cluster name" @Param namespace path string true "The namespace name" @Param name path string true "The pod name" @Param container query string false "The container name (optional if pod has only one container)" @Success 200 {object} LogEntry @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized" @Failure 404 {string} string "Not Found" @Router /insight/aggregator/pod/{cluster}/{namespace}/{name}/log [get]
Types ¶
type Event ¶ added in v0.5.7
type Event struct { Type string `json:"type"` Reason string `json:"reason"` Message string `json:"message"` Count int32 `json:"count"` LastTimestamp string `json:"lastTimestamp"` FirstTimestamp string `json:"firstTimestamp"` }
Event represents a Kubernetes event with additional fields