Documentation ¶
Index ¶
- func NewCallbackAsyncWriter(callback CallbackWriterCallback) sparalog.Writer
- func NewCallbackWriter(callback CallbackWriterCallback) sparalog.Writer
- func NewFileWriter(filename string) (sparalog.Writer, error)
- func NewStdoutWriter() sparalog.Writer
- func NewSyslogWriter(tag string) sparalog.Writer
- func NewTCPWriter(address string, port int, debug bool, cb StateChangeCallback) (sparalog.Writer, error)
- func NewTelegramWriter(botAPIKey string, channelID int) sparalog.Writer
- type CallbackWriterCallback
- type StateChangeCallback
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 ¶
NewFileWriter returns a fileWriter.
func NewStdoutWriter ¶
NewStdoutWriter returns a stdoutWriter.
func NewSyslogWriter ¶
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.
Types ¶
type CallbackWriterCallback ¶
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.
Click to show internal directories.
Click to hide internal directories.