repository

package
v0.0.0-...-5623d4f Latest Latest
Warning

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

Go to latest
Published: May 12, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogQuery

type LogQuery struct {
	// Services is a slice of service name patterns to filter by.
	// If the slice is empty, then events from all services will
	// be returned. Patterns may end with a wildcard "*" character.
	Services []string

	// Severity is the minimum severity that events need to have.
	// Set this to slog.Severity(0) to return all events.
	Severity slog.Severity

	// SinceTime is the earliest inclusive time that events should
	// be from. Set to the zero value to return all events.
	SinceTime time.Time

	// UntilTime is the latest inclusive time that events should
	// be from. Set to the zero value to return all events.
	UntilTime time.Time

	// SinceUUID is a UUID of an event. If not an empty string, only
	// events that happened _after_ this event will be returned. The
	// event with the given UUID itself will not be returned.
	SinceUUID string

	// Reverse will change the order of the returned results. If false,
	// events will be returned in chronological order, i.e. oldest first.
	Reverse bool
}

LogQuery is a set of conditions to apply when finding events

type LogRepository

type LogRepository struct {
	// LogDirectory is the path to the directory containing daily log files
	LogDirectory string
}

LogRepository provides a query interface to the log file

func (*LogRepository) Find

func (r *LogRepository) Find(q *LogQuery) ([]*domain.Event, error)

Find returns all events that match the given query

Jump to

Keyboard shortcuts

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