ctrllogstest

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package ctrllogstest serves controller logs for benchmarks and scale tests: a ctrllogs.Source whose follow streams write marked lines at a fixed rate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source struct {
	Rate  int
	Clock clock.Clock
	Line  func(n int, at time.Time) []byte
	// contains filtered or unexported fields
}

Source is a ctrllogs.Source over an install's running controller Pods. A follow stream writes at once the lines its since covers, Rate per second of Clock, then one line every 1/Rate until the stream ends. Line makes a stream's nth line, timed at; it has no newline. A previous log is never ready.

func (*Source) Follow

func (s *Source) Follow(ctx context.Context, _ ctrllogs.Target, since time.Duration) (io.ReadCloser, error)

Follow implements ctrllogs.Source.

func (*Source) Previous

Previous implements ctrllogs.Source.

func (*Source) Targets

func (*Source) Targets(in install.Resolved) []ctrllogs.Target

Targets implements ctrllogs.Source.

func (*Source) WaitIdle

func (s *Source) WaitIdle(ctx context.Context, n int) error

WaitIdle blocks until n streams are open and each has been read up to the clock's now and waits for its next line, so the reader has handled every line before now. It returns ctx's error if ctx ends first.

Jump to

Keyboard shortcuts

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