inform

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute starts the server

func StartWorkerService

func StartWorkerService(data *ServiceData) error

StartWorkerService starts the event queue listener service to listen for configured events return channel to track the finish event

to wait sync for the service to finish: fc, err := StartWorkerService(data) handle err <-fc // waits for finish

Types

type EmailMaker

type EmailMaker interface {
	Make(data *aInform.Data) (*email.Email, error)
}

EmailMaker prepares the email

type EmailRetriever

type EmailRetriever interface {
	Get(ID string) (string, error)
}

EmailRetriever return the email by ID

type Locker

type Locker interface {
	Lock(id string, lockKey string) error
	UnLock(id string, lockKey string, value *int) error
}

Locker tracks email sending process It is used to quarantee not to send the emails twice

type Sender

type Sender interface {
	Send(email *email.Email) error
}

Sender send emails

type ServiceData

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

ServiceData keeps data required for service work

Jump to

Keyboard shortcuts

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