notifier

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Console

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

Console notifier structure

func (*Console) Reload

func (c *Console) Reload()

Reload for handling SIGHUP signals

func (*Console) Run

func (c *Console) Run()

Run starts console notifier

type File

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

File structure for file notifier

func (*File) Reload

func (f *File) Reload()

Reload closes and re-open the file to be compatible with logrotate

func (*File) Run

func (f *File) Run()

Run starts the file notifier

type Notifier

type Notifier interface {
	Run()
	Reload()
}

Notifier generic interface for implementing a notifier

func NewConsole

func NewConsole(format string, sessions chan *base.Session) Notifier

NewConsole creates a console notifier

func NewFile

func NewFile(format string, name string, sessions chan *base.Session) Notifier

NewFile creates a file notifier

func NewNotifier

func NewNotifier(ctx *base.Context) Notifier

NewNotifier looks into Config to create a Console, File or Syslog notifier and pass it the session channel for consuming sessions structs sent by terminator

func NewSyslog

func NewSyslog(facility string, ident string, format string, sessions chan *base.Session) Notifier

NewSyslog creates a syslog notifier

type Syslog

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

Syslog notifier

func (*Syslog) Reload

func (s *Syslog) Reload()

Reload disconnect from syslog daemon and re-connect Executed when receiving SIGHUP signal

func (*Syslog) Run

func (s *Syslog) Run()

Run starts syslog notifier

Jump to

Keyboard shortcuts

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