logs

package
v0.7.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogStreamer

type LogStreamer struct {
	// contains filtered or unexported fields
}

LogStreamer handles streaming logs using custom direct streaming

func NewLogStreamer

func NewLogStreamer(client *kubernetes.Client, discovery *PodDiscovery, ctx context.Context, sinceTime *time.Time) *LogStreamer

NewLogStreamer creates a new LogStreamer instance

func (*LogStreamer) GetSSEChannel

func (ls *LogStreamer) GetSSEChannel() <-chan SSEMessage

GetSSEChannel returns the channel for SSE messages

func (*LogStreamer) SendKeepalive

func (ls *LogStreamer) SendKeepalive()

SendKeepalive sends a ping message to keep the connection alive

func (*LogStreamer) Start

func (ls *LogStreamer) Start() error

Start begins streaming logs from discovered targets

func (*LogStreamer) Stop

func (ls *LogStreamer) Stop()

Stop stops all streaming and closes the SSE channel

type LogTarget

type LogTarget struct {
	ID            string          `json:"id"` // Unique ID for the stream manager
	Namespace     string          `json:"namespace"`
	LabelSelector labels.Selector `json:"labelSelector"` // Selector for Stern
	Type          string          `json:"type"`          // "pod" or "test"
	ContainerName string          `json:"containerName"` // Optional concrete container name
}

LogTarget represents a target to stream logs from (e.g., a Deployment or Job)

type PodDiscovery

type PodDiscovery struct {
	// contains filtered or unexported fields
}

PodDiscovery handles discovering streaming targets

func NewPodDiscovery

func NewPodDiscovery(client *kubernetes.Client, namespace, rolloutName, currentVersionTag, filterType string) *PodDiscovery

NewPodDiscovery creates a new PodDiscovery instance

func (*PodDiscovery) Discover

func (pd *PodDiscovery) Discover(ctx context.Context) ([]LogTarget, error)

Discover finds all targets that should have their logs streamed

type PodInfo

type PodInfo struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Type      string `json:"type"`
}

PodInfo represents information about a pod for the frontend

type SSEMessage

type SSEMessage struct {
	Event string
	Data  string
}

SSEMessage represents a message to send via SSE

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL