guardian

package
v0.0.0-...-d6bd6e3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Inst

func Inst() common.SendingService

Inst создает новый сервис блокировок

Types

type Config

type Config struct {
	// Excludes хосты, на которую блокируется отправка писем
	Excludes []string `yaml:"exclude"`
}

type Guardian

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

Guardian защитник, блокирует отправку на указанные почтовые сервисы

type Service

type Service struct {
	// GuardiansCount количество горутин блокирующий отправку писем к почтовым сервисам
	GuardiansCount int `yaml:"workers"`

	Configs map[string]*Config `yaml:"postmans"`
	// contains filtered or unexported fields
}

Service сервис блокирующий отправку писем

func (*Service) Event

func (s *Service) Event(ev *common.SendEvent) bool

Event send event

func (*Service) OnFinish

func (s *Service) OnFinish()

OnFinish завершает работу сервиса соединений

func (*Service) OnInit

func (s *Service) OnInit(event *common.ApplicationEvent)

OnInit инициализирует сервис блокировок

func (*Service) OnRun

func (s *Service) OnRun()

OnRun запускает горутины

Jump to

Keyboard shortcuts

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