syslog

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TargetHandler

func TargetHandler(config interface{}) (io.Writer, error)

Types

type TargetHandlerConfig

type TargetHandlerConfig struct {
	Enabled  bool   `default:"false"`
	Network  string `default:"udp"`
	Address  string `default:"localhost:514"`
	Severity string `default:"emerg"`
	Facility string `default:"local0"`
	Tag      string `default:"default"`
}

type Writer

type Writer struct {
	io.Writer

	Address string
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(config WriterConfig) (*Writer, error)

func (*Writer) Write

func (w *Writer) Write(p []byte) (n int, err error)

type WriterConfig

type WriterConfig struct {
	Network  string
	Address  string
	Priority s.Priority
	Tag      string
}

Jump to

Keyboard shortcuts

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