Help us shape the future of Go! Take the 2026 Go Developer Survey

logs

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name string
	Data []byte
	Err  error
}

File represents log file content.

type Log

type Log struct {
	FilePath  string
	UnitName  string
	Extractor []string
}

type Logs

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

Logs is responsible for interactions with logs.

func New

func New(pmmVersion string, consul *consul.Client, rds *rds.Service, logs []Log) *Logs

New creates a new Logs service. n is a number of last lines of log to read.

func (*Logs) Files

func (l *Logs) Files(ctx context.Context) []File

Files returns list of logs and their content.

func (*Logs) Zip

func (l *Logs) Zip(ctx context.Context, w io.Writer) error

Zip creates .zip archive with all logs.

Jump to

Keyboard shortcuts

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