Documentation ¶
Overview ¶
Package logutil creates a Multi writer instance that write all logs that are written to stdout.
Index ¶
Constants ¶
View Source
const ( // LogCacheSize is the number of log entries to keep in memory for new // websocket connections. LogCacheSize = 20 )
Variables ¶
This section is empty.
Functions ¶
func ConfigurePersistentLogging ¶
ConfigurePersistentLogging adds a log-to-file writer. File content is identical to stdout.
Types ¶
type StreamServer ¶ added in v1.0.0
type StreamServer struct {
// contains filtered or unexported fields
}
StreamServer defines a a websocket server which can receive events from a feed and write them to open websocket connections.
func NewLogStreamServer ¶ added in v1.0.0
func NewLogStreamServer() *StreamServer
NewLogStreamServer initializes a new stream server capable of streaming log events via a websocket connection.
func (*StreamServer) Handler ¶ added in v1.0.0
func (ss *StreamServer) Handler(w http.ResponseWriter, r *http.Request)
Handler for new websocket connections to stream new events received via an event feed as they occur.
Click to show internal directories.
Click to hide internal directories.