Documentation ¶
Overview ¶
kat (Kubernetes Attach & Tail) follows and streams logs from every container in every pod across specified namespaces in real-time. It automatically attaches to new pods as they start up and detaches when they terminate. Think of it as cat(1) and tail(1) combined, but for watching all container logs in your selected Kubernetes namespaces simultaneously.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callbacks ¶
type Callbacks struct { OnError func(err error) OnFileClosed func(filePath string) OnFileCreated func(filePath string) OnLogLine func(namespace, podName, containerName, line string) OnStreamStart func(namespace, podName, containerName string) OnStreamStop func(namespace, podName, containerName string) }
Callbacks provides hooks for progress updates.
type Kat ¶
type Kat struct {
// contains filtered or unexported fields
}
Kat represents the main structure for managing POD log streaming.
func New ¶
func New(clientset *kubernetes.Clientset, outputConfig *OutputConfig, callbacks *Callbacks) *Kat
New creates a new Kat instance.
func (*Kat) StartStreaming ¶
StartStreaming begins streaming logs for the specified namespaces.
func (*Kat) StopStreaming ¶
StopStreaming stops all active log streams and closes open files.
type OutputConfig ¶
type OutputConfig struct { TeeDir string // Directory to write logs (optional). Silent bool // Suppress console log output. }
OutputConfig encapsulates configuration for controlling log output.