channel

package
v1.3.1-dev.18.0...-398431f Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmailSenderName = di.TypeInstanceToName(EmailSender{})

EmailSenderName contains the name of the channel.EmailSender implementation in the DIC.

View Source
var RESTSenderName = di.TypeInstanceToName(RESTSender{})

RESTSenderName contains the name of the channel.RESTSender implementation in the DIC.

Functions

This section is empty.

Types

type EmailSender

type EmailSender struct {
	// contains filtered or unexported fields
}

EmailSender is the implementation of the interfaces.ChannelSender, which is used to send the notifications via email

func (*EmailSender) Send

func (sender *EmailSender) Send(notification models.Notification, address models.Address) (res string, err errors.EdgeX)

Send sends the email to the specified address

type RESTSender

type RESTSender struct {
	// contains filtered or unexported fields
}

RESTSender is the implementation of the interfaces.ChannelSender, which is used to send the notifications via REST

func (*RESTSender) Send

func (sender *RESTSender) Send(notification models.Notification, address models.Address) (res string, err errors.EdgeX)

Send sends the REST request to the specified address

type Sender

type Sender interface {
	Send(notification models.Notification, address models.Address) (res string, err errors.EdgeX)
}

Sender abstracts the notification sending via specified channel

func EmailSenderFrom

func EmailSenderFrom(get di.Get) Sender

EmailSenderFrom helper function queries the DIC and returns the channel.Sender implementation.

func NewEmailSender

func NewEmailSender(dic *di.Container) Sender

NewEmailSender creates the EmailSender instance

func NewRESTSender

func NewRESTSender(dic *di.Container) Sender

NewRESTSender creates the RESTSender instance

func RESTSenderFrom

func RESTSenderFrom(get di.Get) Sender

RESTSenderFrom helper function queries the DIC and returns the channel.Sender implementation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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