alerts

package
v0.0.0-...-8f7bd20 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package alerts provides set of API to send system and services alerts

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alerts

type Alerts struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Alerts instance.

func New

func New(config config.Alerts, sender Sender) (instance *Alerts, err error)

New creates new alerts object.

func (*Alerts) Close

func (instance *Alerts) Close()

Close closes logging.

func (*Alerts) CloudConnected

func (instance *Alerts) CloudConnected()

CloudConnected indicates unit connected to cloud.

func (*Alerts) CloudDisconnected

func (instance *Alerts) CloudDisconnected()

CloudDisconnected indicates unit disconnected from cloud.

func (*Alerts) SendAlert

func (instance *Alerts) SendAlert(alert interface{})

SendAlert sends alert.

type Sender

type Sender interface {
	SubscribeForConnectionEvents(consumer amqphandler.ConnectionEventsConsumer) error
	UnsubscribeFromConnectionEvents(consumer amqphandler.ConnectionEventsConsumer) error
	SendAlerts(alerts cloudprotocol.Alerts) error
}

Sender alerts sender to the cloud interface.

Jump to

Keyboard shortcuts

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