Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventWatchNotifier ¶
type EventWatchNotifier interface { Register(ref *typesCoreV1.ObjectReference) error Unregister(ref *typesCoreV1.ObjectReference) error }
EventWatchNotifier allows to watch events for a given Pod and send notification to Slack if received event Type is different that `Normal`
type Observable ¶
Observable defines which Pods should be observed
type PodDetector ¶
type PodDetector struct {
// contains filtered or unexported fields
}
PodDetector dynamically register and unregister Pods for event watching. Registered Pods belongs to requested Deployments.
func NewPodDetector ¶
func NewPodDetector(podInformer informersCoreV1.PodInformer, watcher EventWatchNotifier, log logrus.FieldLogger, observables ...Observable) *PodDetector
NewPodDetector returns new instance of the PodDetector
func (*PodDetector) Start ¶
func (e *PodDetector) Start() error
Start starts the process of registering Pods from given Deployment into EventWatcher
type SlackNotifier ¶
SlackNotifier allows sending notification about messages to Slack channel.
type WatcherService ¶
type WatcherService struct {
// contains filtered or unexported fields
}
WatcherService allows to watch events for a given Pod and send notification to Slack if received event Type is different that `Normal`
func NewWatcherService ¶
func NewWatcherService(eventCli corev1.CoreV1Interface, slackNotifier SlackNotifier, log logrus.FieldLogger) *WatcherService
NewWatcherService returns new instance of the WatcherService
func (*WatcherService) Register ¶
func (s *WatcherService) Register(ref *v1.ObjectReference) error
Register registers given obj and starts watching events from it. Error is not returned when object with the same Name is already registered.
func (*WatcherService) Unregister ¶
func (s *WatcherService) Unregister(ref *v1.ObjectReference) error
Unregister removes obj from watcher list and stop watching the events from it. Error is not returned when object was not registered.