journald

package
v2.19.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package journald provides functions to read and collect journald logs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector collects logs from journald.

func NewCollector

func NewCollector(ctx context.Context) (*Collector, error)

NewCollector creates a new Collector for journald logs.

func (*Collector) Error

func (c *Collector) Error() ([]byte, error)

Error returns output to stderr as bytes as well as the exit code in form of an error.

func (*Collector) Start

func (c *Collector) Start() (io.ReadCloser, error)

Start returns a pipe to read the systemd logs. This should be read with a bufio Reader.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL