sendunit

package
v0.0.0-...-264dbbd Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SendUnitPool sync.Map

Functions

This section is empty.

Types

type EmailSend

type EmailSend struct {
	SendInfo      *co_entity.Send
	SendList      chan *co_entity.SendList
	SendListModel *[]co_entity.SendList
	Message       *co_entity.Message
	MaxGo         int //协程数量
	Response      chan *EmailSendResponse
	WithGroup     sync.WaitGroup
	Ctx           context.Context
	SmtpServer    co_entity.SmtpServer
	Dispatch      dispatch2.EmailDispatcher
	Signal        *list.List
	SignalLock    sync.RWMutex
	SignPool      []*SignalCmd
	HaveSignalCmd chan int8
	Status        int8
	StatusLock    sync.RWMutex
}

func GetSendEmailUnitPool

func GetSendEmailUnitPool(key string) (res *EmailSend, have bool)

func (*EmailSend) AddSendList

func (e *EmailSend) AddSendList(sendList *co_entity.SendList)

func (*EmailSend) Close

func (e *EmailSend) Close()

func (*EmailSend) Init

func (e *EmailSend) Init(maxGo int, sendInfo *co_entity.Send, sendList *[]co_entity.SendList, ctx context.Context)

func (*EmailSend) Pause

func (e *EmailSend) Pause()

func (*EmailSend) Send

func (e *EmailSend) Send(send *co_entity.SendList, smtpserver *co_entity.SmtpServer) (err error)

func (*EmailSend) Start

func (e *EmailSend) Start()

func (*EmailSend) StartSend

func (e *EmailSend) StartSend(signalCmd *SignalCmd, goIndex int)

func (*EmailSend) Stop

func (e *EmailSend) Stop()

type EmailSendResponse

type EmailSendResponse struct {
	Code int
}

type SendUniter

type SendUniter interface {
	AddSendList(*co_entity.SendList)
	Init(int, *co_entity.Send, *[]co_entity.SendList, context.Context)
	Stop()
	Pause()
	Start()
}

func SendFactory

func SendFactory(unitType int) SendUniter

type SignalCmd

type SignalCmd struct {
	WithGroup *sync.WaitGroup
	Signal    chan int8
}

Jump to

Keyboard shortcuts

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