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.
Click to show internal directories.
Click to hide internal directories.