writers

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCallbackAsyncWriter

func NewCallbackAsyncWriter(callback CallbackWriterCallback) sparalog.Writer

NewCallbackAsyncWriter returns a callbackAsyncWriter.

func NewCallbackWriter

func NewCallbackWriter(callback CallbackWriterCallback) sparalog.Writer

NewCallbackWriter returns a callbackWriter.

func NewFileWriter

func NewFileWriter(filename string) (sparalog.Writer, error)

NewFileWriter returns a fileWriter.

func NewStdoutWriter

func NewStdoutWriter() sparalog.Writer

NewStdoutWriter returns a stdoutWriter.

func NewSyslogWriter

func NewSyslogWriter(tag string) sparalog.Writer

If tag is empty, the os.Args[0] is used.

func NewTCPWriter

func NewTCPWriter(address string, port int, debug bool, cb StateChangeCallback) (sparalog.Writer, error)

NewTCPWriter returns a tcpWriter.

func NewTelegramWriter

func NewTelegramWriter(botAPIKey string, channelID int) sparalog.Writer

NewTelegramWriter returns a telegramWriter.

Types

type CallbackWriterCallback

type CallbackWriterCallback func(sparalog.Item) error

CallbackWriterCallback define the writer callback.

type StateChangeCallback

type StateChangeCallback func(bool)

StateChangeCallback is called (true) when first client connecting, and (false) when there are no more clients.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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