mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-18 12:37:05 +02:00
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>
17 lines
623 B
Go
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")
|