Add exclude-listeners parameter

This commit is contained in:
Julien Riou 2018-07-08 23:48:48 +02:00
parent ebc48e3615
commit c0382eaad9
No known key found for this signature in database
GPG key ID: BA3E15176E45E85D
10 changed files with 47 additions and 22 deletions

View file

@ -7,11 +7,11 @@ import (
// Console notifier structure
type Console struct {
sessions chan base.Session
sessions chan *base.Session
}
// NewConsole creates a console notifier
func NewConsole(sessions chan base.Session) Notifier {
func NewConsole(sessions chan *base.Session) Notifier {
return &Console{
sessions: sessions,
}

View file

@ -12,12 +12,12 @@ import (
type File struct {
handle *os.File
name string
sessions chan base.Session
sessions chan *base.Session
mutex sync.Mutex
}
// NewFile creates a file notifier
func NewFile(name string, sessions chan base.Session) Notifier {
func NewFile(name string, sessions chan *base.Session) Notifier {
return &File{
name: name,
sessions: sessions,

View file

@ -9,14 +9,14 @@ import (
// Syslog notifier
type Syslog struct {
sessions chan base.Session
sessions chan *base.Session
ident string
priority syslog.Priority
writer *syslog.Writer
}
// NewSyslog creates a syslog notifier
func NewSyslog(facility string, ident string, sessions chan base.Session) Notifier {
func NewSyslog(facility string, ident string, sessions chan *base.Session) Notifier {
var priority syslog.Priority
switch facility {
case "LOCAL0":