listener

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultIPCFilepath = "/var/run/salt/master/master_event_pub.ipc"
View Source
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) Open

func (e *EventListener) Open()

Open opens the salt-master event bus

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()

Jump to

Keyboard shortcuts

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