logs

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(streams LogStreams) io.ReadCloser

Merge fans named log streams into one reader. Closing the returned reader closes every source stream.

func UniqueName

func UniqueName(streams LogStreams, name string) string

UniqueName returns name unless it already exists, in which case it adds a numeric suffix.

Types

type LogStreams

type LogStreams map[string]io.ReadCloser

LogStreams is a named collection of log readers.

func (LogStreams) Close

func (streams LogStreams) Close() error

Close closes every stream in the collection.

func (LogStreams) GetStream

func (streams LogStreams) GetStream(names ...string) (io.ReadCloser, bool)

GetStream returns a named log stream. Multiple names are joined with ".", so GetStream("data", "postgres") looks up "data.postgres".

func (LogStreams) Merge

func (streams LogStreams) Merge() io.ReadCloser

Merge returns a single reader containing every stream in the collection. Closing the returned reader closes every source stream.

Jump to

Keyboard shortcuts

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