package loggertest

import "github.com/dotcloud/docker/daemon/logger/loggertest"

Index

Types

type Reader

type Reader struct {
	// Factory returns a function which constructs loggers for the container
	// specified in info. Each call to the returned function must yield a
	// distinct logger instance which can read back logs written by earlier
	// instances.
	Factory func(*testing.T, logger.Info) func(*testing.T) logger.Logger
}

Reader tests that a logger.LogReader implementation behaves as it should.

func (Reader) TestConcurrent

func (tr Reader) TestConcurrent(t *testing.T)

TestConcurrent tests the Logger and its LogReader implementation for race conditions when logging from multiple goroutines concurrently.

func (Reader) TestFollow

func (tr Reader) TestFollow(t *testing.T)

TestFollow tests the LogReader's follow implementation.

The LogReader is expected to be able to follow an arbitrary number of messages at a high rate with no dropped messages.

func (Reader) TestTail

func (tr Reader) TestTail(t *testing.T)

TestTail tests the behavior of the LogReader's tail implementation.

Source Files

logreader.go

Version
v26.0.0-rc1+incompatible
Published
Feb 28, 2024
Platform
js/wasm
Imports
13 packages
Last checked
54 minutes ago

Tools for package owners.