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 ¶
- type Source
- func (s *Source) Follow(ctx context.Context, _ ctrllogs.Target, since time.Duration) (io.ReadCloser, error)
- func (*Source) Previous(context.Context, ctrllogs.Target) (io.ReadCloser, error)
- func (*Source) Targets(in install.Resolved) []ctrllogs.Target
- func (s *Source) WaitIdle(ctx context.Context, n int) error
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.
Click to show internal directories.
Click to hide internal directories.