summaryrefslogtreecommitdiff
path: root/vendor/gopkg.in/mcuadros/go-syslog.v2/handler.go
diff options
context:
space:
mode:
authorLibravatar Terin Stock <terinjokes@gmail.com>2025-03-09 17:47:56 +0100
committerLibravatar Terin Stock <terinjokes@gmail.com>2025-12-01 22:08:04 +0100
commitb1af8fd87760b34e3ff2fd3bda38f211815a0473 (patch)
tree9317fad1a7ec298d7a8d2678e4e422953bbc6f33 /vendor/gopkg.in/mcuadros/go-syslog.v2/handler.go
parent[chore] update URLs to forked source (diff)
downloadgotosocial-b1af8fd87760b34e3ff2fd3bda38f211815a0473.tar.xz
[chore] remove vendor
Diffstat (limited to 'vendor/gopkg.in/mcuadros/go-syslog.v2/handler.go')
-rw-r--r--vendor/gopkg.in/mcuadros/go-syslog.v2/handler.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/vendor/gopkg.in/mcuadros/go-syslog.v2/handler.go b/vendor/gopkg.in/mcuadros/go-syslog.v2/handler.go
deleted file mode 100644
index 9914b3ea1..000000000
--- a/vendor/gopkg.in/mcuadros/go-syslog.v2/handler.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package syslog
-
-import (
- "gopkg.in/mcuadros/go-syslog.v2/format"
-)
-
-//The handler receive every syslog entry at Handle method
-type Handler interface {
- Handle(format.LogParts, int64, error)
-}
-
-type LogPartsChannel chan format.LogParts
-
-//The ChannelHandler will send all the syslog entries into the given channel
-type ChannelHandler struct {
- channel LogPartsChannel
-}
-
-//NewChannelHandler returns a new ChannelHandler
-func NewChannelHandler(channel LogPartsChannel) *ChannelHandler {
- handler := new(ChannelHandler)
- handler.SetChannel(channel)
-
- return handler
-}
-
-//The channel to be used
-func (h *ChannelHandler) SetChannel(channel LogPartsChannel) {
- h.channel = channel
-}
-
-//Syslog entry receiver
-func (h *ChannelHandler) Handle(logParts format.LogParts, messageLength int64, err error) {
- h.channel <- logParts
-}