Documentation ¶ Index ¶ type Buffer func New(size int) *Buffer func (b *Buffer) Clear() func (b *Buffer) MaxSize() int func (b *Buffer) Recent(limit int) []Entry func (b *Buffer) Subscribe() chan Entry func (b *Buffer) Unsubscribe(ch chan Entry) func (b *Buffer) Write(p []byte) (int, error) type Entry Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Buffer ¶ type Buffer struct { // contains filtered or unexported fields } func New ¶ func New(size int) *Buffer func (*Buffer) Clear ¶ func (b *Buffer) Clear() func (*Buffer) MaxSize ¶ func (b *Buffer) MaxSize() int func (*Buffer) Recent ¶ func (b *Buffer) Recent(limit int) []Entry func (*Buffer) Subscribe ¶ func (b *Buffer) Subscribe() chan Entry func (*Buffer) Unsubscribe ¶ func (b *Buffer) Unsubscribe(ch chan Entry) func (*Buffer) Write ¶ func (b *Buffer) Write(p []byte) (int, error) type Entry ¶ type Entry struct { Timestamp time.Time `json:"timestamp"` Message string `json:"message"` } Source Files ¶ View all Source files logbuf.go Click to show internal directories. Click to hide internal directories.