Documentation
¶
Overview ¶
Package logstream implements an io.Writer that buffers lines written to it in a ring buffer and allows them to be streamed through an HTTP endpoint or retrieved as a snapshot.
This package is based on gokrazy's code, see https://github.com/gokrazy/gokrazy/blob/main/LICENSE.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Streamer ¶
type Streamer interface { io.Writer http.Handler // Lines returns all logged lines. Lines() []string // Stream generates a new channel which will stream any newly logged lines. // Deregister the stream by calling the returned function. Stream() (<-chan string, func()) }
Streamer is an io.Writer that contains all logged lines and allows to stream them.
Click to show internal directories.
Click to hide internal directories.