internal

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDate

func BuildDate() time.Time

BuildDate applied build time

func CommitHash

func CommitHash() string

CommitHash applied git hash

func Version

func Version() string

Version applied app version

Types

type Config

type Config struct {
	tail.Config
	// Pattern is the log level and message pattern in a log line.
	Pattern string
	// Levels if match log level then notify alert.
	Levels []string
	// Excludes if match word then don't notify alert.
	Excludes []string
	// WebhookURL is slack incoming webhook URL.
	WebhookURL string
	// WebhookChannel is slack incoming webhook channel.
	WebhookChannel string
	// WebhookAppID is webhook message field.
	WebhookAppID string
	// WebhookOwners is webhook message field.
	WebhookOwners []string
	// WebhookTextFormat is webhook message text format.
	WebhookTextFormat string
}

Config is used to specify how a file must be tailed.

type Tester added in v0.2.0

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

Tester is check, test message pattern

func NewTester added in v0.2.0

func NewTester() *Tester

NewTester creates tester instance.

func (*Tester) Test added in v0.2.0

func (p *Tester) Test(filename string, config *Config) error

Test begins tailing the file, check and pass event to the notifier

type Watcher

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

Watcher is tailing the file, check and pass event to the notifier

func NewWatcher

func NewWatcher() *Watcher

NewWatcher creates watcher instance.

func (*Watcher) Watch

func (p *Watcher) Watch(filename string, config *Config) error

Watch begins tailing the file, check and pass event to the notifier

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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