Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxWriterBuffer = 512 * 1024
MaxWriterBuffer specifies how big the writer buffer can get before killing the writer.
View Source
var WriterGroup = NewMirrorWriter()
WriterGroup is the global writer group for logs to output to
Functions ¶
This section is empty.
Types ¶
type MirrorWriter ¶
type MirrorWriter struct {
// contains filtered or unexported fields
}
MirrorWriter implements a WriteCloser which syncs incoming bytes to multiple [buffered] WriteClosers. They can be added with AddWriter().
func NewMirrorWriter ¶
func NewMirrorWriter() *MirrorWriter
NewMirrorWriter initializes and returns a MirrorWriter.
func (*MirrorWriter) Active ¶
func (mw *MirrorWriter) Active() (active bool)
Active returns if there is at least one Writer attached to this MirrorWriter
func (*MirrorWriter) AddWriter ¶
func (mw *MirrorWriter) AddWriter(w io.WriteCloser)
AddWriter attaches a new WriteCloser to this MirrorWriter. The new writer will start getting any bytes written to the mirror.
Click to show internal directories.
Click to hide internal directories.