Documentation ¶
Index ¶
Constants ¶
const DefaultIPCFilepath = "/var/run/salt/master/master_event_pub.ipc"
const DefaultPKIDirpath = "/etc/salt/pki/master"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventListener ¶
type EventListener struct {
// contains filtered or unexported fields
}
EventListener listens to the salt-master event bus and sends events to the event channel
func NewEventListener ¶
func NewEventListener(ctx context.Context, eventParser eventParser, eventChan chan event.SaltEvent) *EventListener
NewEventListener creates a new EventListener
The events will be sent to eventChan.
func (*EventListener) Close ¶
func (e *EventListener) Close() error
Close closes the salt-master event bus
func (*EventListener) ListenEvents ¶
func (e *EventListener) ListenEvents()
ListenEvents listens to the salt-master event bus and sends events to the event channel
func (*EventListener) Reconnect ¶
func (e *EventListener) Reconnect()
Reconnect reconnects to the salt-master event bus
func (*EventListener) SetIPCFilepath ¶
func (e *EventListener) SetIPCFilepath(filepath string)
SetIPCFilepath sets the filepath to the salt-master event bus
The IPC file must be readable by the user running the exporter.
Default: /var/run/salt/master/master_event_pub.ipc
type PKIWatcher ¶ added in v0.9.0
type PKIWatcher struct {
// contains filtered or unexported fields
}
func NewPKIWatcher ¶ added in v0.9.0
func NewPKIWatcher(ctx context.Context, pkiDirPath string, eventChan chan event.WatchEvent) (*PKIWatcher, error)
func (*PKIWatcher) SetPKIDirectory ¶ added in v0.9.0
func (w *PKIWatcher) SetPKIDirectory(filepath string)
SetPKIDirectory sets the filepath to the salt-master pki directory
The directory must be readable by the user running the exporter (usually salt).
Default: /etc/salt/pki
func (*PKIWatcher) StartWatching ¶ added in v0.9.0
func (w *PKIWatcher) StartWatching()
func (*PKIWatcher) Stop ¶ added in v0.9.0
func (w *PKIWatcher) Stop()