Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONWriter ¶
type JSONWriter struct {
Writer io.Writer
Source *StreamSource
// contains filtered or unexported fields
}
JSONWriter formats log lines as JSON objects
func NewJSONWriter ¶
func NewJSONWriter(w io.Writer, source *StreamSource) *JSONWriter
NewJSONWriter creates a new JSON writer
type LogEntry ¶
type LogEntry struct {
Timestamp string `json:"timestamp" yaml:"timestamp"`
Component string `json:"component" yaml:"component"`
ComponentID string `json:"componentId" yaml:"componentId"`
Pod string `json:"pod" yaml:"pod"`
Container string `json:"container" yaml:"container"`
Namespace string `json:"namespace" yaml:"namespace"`
Message string `json:"message" yaml:"message"`
}
LogEntry represents a structured log entry for JSON/YAML output
type LogStreamer ¶
type LogStreamer struct {
Config *rest.Config
PodClient v1.PodsGetter
Namespace string
PodName string
Container string
Options *Options
Stream io.ReadCloser
}
func NewLogStreamer ¶
func NewLogStreamer(kubeConfig []byte, options *Options) (*LogStreamer, error)
NewLogStreamer creates a new log streamer for a specific pod/container
type Multiplexer ¶
type Multiplexer struct {
Sources []*StreamSource
Prefix bool
NoColor bool
OutputFormat string // "stylish", "json", "yaml"
// contains filtered or unexported fields
}
Multiplexer coordinates concurrent log streaming from multiple sources
func NewMultiplexer ¶
func NewMultiplexer(sources []*StreamSource, prefix bool, noColor bool, outputFormat string) *Multiplexer
NewMultiplexer creates a new log multiplexer
func (*Multiplexer) Start ¶
func (m *Multiplexer) Start() error
Start begins streaming from all sources concurrently
func (*Multiplexer) Wait ¶
func (m *Multiplexer) Wait() []error
Wait blocks until all streams complete or are stopped
type PrefixWriter ¶
type PrefixWriter struct {
Writer io.Writer
Prefix string
Color *color.Color
// contains filtered or unexported fields
}
PrefixWriter wraps an io.Writer with thread-safe line prefixing
func NewPrefixWriter ¶
NewPrefixWriter creates a new prefix writer
func (*PrefixWriter) Flush ¶
func (pw *PrefixWriter) Flush() error
Flush flushes any remaining data in the buffer
type StreamSource ¶
type StreamSource struct {
ComponentID string
ComponentName string
Namespace string
PodName string
Container string
Streamer *LogStreamer
}
StreamSource represents a single log stream source
type YAMLWriter ¶
type YAMLWriter struct {
Writer io.Writer
Source *StreamSource
// contains filtered or unexported fields
}
YAMLWriter formats log lines as YAML documents
func NewYAMLWriter ¶
func NewYAMLWriter(w io.Writer, source *StreamSource) *YAMLWriter
NewYAMLWriter creates a new YAML writer