talos/internal/pkg/circular/errors.go
Andrey Smirnov 0a4645fe80 feat: implement circular buffer for system logs
This replaces logging to files with inotify following to pure in-memory
circular buffer which grows on demand capped at specified maximum
capacity.

The concern with previous approach was that logs on tmpfs were growing
without any bound potentially consuming all the node memory.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-06-26 15:33:54 -07:00

17 lines
623 B
Go

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package circular
import "errors"
// ErrClosed is raised on read from closed Reader.
var ErrClosed = errors.New("reader is closed")
// ErrSeekBeforeStart is raised when seek goes beyond start of the file.
var ErrSeekBeforeStart = errors.New("seek before start")
// ErrOutOfSync is raised when reader got too much out of sync with the writer.
var ErrOutOfSync = errors.New("buffer overrun, read position overwritten")