worker

package
v0.0.0-...-32d6f47 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxExecutionTime is the maximum number of seconds a task can run
	MaxExecutionTime int = 3600 * 4
)

Variables

View Source
var NoEphemeralWorkflows = false

this variable is set when running acceptance tests to disable ephemeral jobs without it, it is not possible to inspect the jobs collection to assert the values stored in the database

Functions

func InitAndRun

func InitAndRun(
	conf config.Reader,
	workflows Workflows,
	dataStore store.DataStore,
	natsClient nats.Client,
) error

InitAndRun initializes the worker and runs it

Types

type SMTPClient

type SMTPClient struct {
}

SMTPClient an SMTP client using smtp.SendMail

func (*SMTPClient) SendMail

func (c *SMTPClient) SendMail(
	addr string,
	a smtp.Auth,
	from string,
	to []string,
	msg []byte,
) error

SendMail sends an email using smtp.SendMail

type SMTPClientInterface

type SMTPClientInterface interface {
	SendMail(addr string, a smtp.Auth, from string, to []string, msg []byte) error
}

SMTPClientInterface is the interface which describes an SMTP client

type SMTPClientMock

type SMTPClientMock struct {
	mock.Mock
}

SMTPClientMock is a mocked SMTPClient

func (*SMTPClientMock) SendMail

func (c *SMTPClientMock) SendMail(
	addr string,
	a smtp.Auth,
	from string,
	to []string,
	msg []byte,
) error

SendMail is the mocked method to send emails

type Workflows

type Workflows struct {
	Included []string
	Excluded []string
}

Workflows filters workflows executed by a worker

Jump to

Keyboard shortcuts

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