messages

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package messages is a latency timing source for /var/log/messages

Index

Constants

This section is empty.

Variables

View Source
var (
	Name            = "Messages"
	DefaultPath     = "/var/log/messages*"
	TimestampFormat = regexp.MustCompile(`[A-Z][a-z]+[ ]+[0-9][0-9]? [0-9]{2}:[0-9]{2}:[0-9]{2}`)
	TimestampLayout = "Jan 2 15:04:05 2006"
)

Functions

This section is empty.

Types

type MessagesSource

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

MessagesSource is the /var/log/messages log source

func New

func New(path string) *MessagesSource

New instantiates a new instance of messages source

func (MessagesSource) ClearCache

func (m MessagesSource) ClearCache()

ClearCache will clear the log reader cache

func (MessagesSource) Find

func (m MessagesSource) Find(search string, firstOccurrence bool) (time.Time, error)

Find searches the /var/log/messages log source based on the regexp string provided

func (MessagesSource) Name

func (m MessagesSource) Name() string

Name is the name of the source

func (MessagesSource) String

func (m MessagesSource) String() string

Jump to

Keyboard shortcuts

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