stream

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package stream contains the logic for streaming logs from from UDS Core

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader interface {
	// PodFilter creates a map of pod and container names to pull logs from
	PodFilter(pods []corev1.Pod) map[string]string

	// LogStream processes the log stream from Pepr and writes formatted output to the writer
	LogStream(writer io.Writer, logStream io.ReadCloser, timestamp bool) error

	// LogFlush to flush the log at a given interval and at the end of the stream
	LogFlush(writer io.Writer)
}

type Stream

type Stream struct {
	Follow     bool
	Timestamps bool
	Namespace  string
	Since      time.Duration
	// Adding for testability :-<
	Client kubernetes.Interface
	// contains filtered or unexported fields
}

func NewStream

func NewStream(writer io.Writer, reader Reader, namespace string) *Stream

func (*Stream) Start

func (s *Stream) Start(ctx context.Context) error

Start starts the stream with the provided context

Jump to

Keyboard shortcuts

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