Documentation ¶
Overview ¶
Package intermediate serves as the foundation of the smtp.ingress.core microservice.
The SMTP ingress microservice listens for incoming emails and fires corresponding events.
Index ¶
- type Intermediate
- func (svc *Intermediate) Enabled() (enabled bool)
- func (svc *Intermediate) MaxClients() (clients int)
- func (svc *Intermediate) MaxSize() (mb int)
- func (svc *Intermediate) Port() (port int)
- func (svc *Intermediate) SetEnabled(enabled bool) error
- func (svc *Intermediate) SetMaxClients(clients int) error
- func (svc *Intermediate) SetMaxSize(mb int) error
- func (svc *Intermediate) SetPort(port int) error
- func (svc *Intermediate) SetWorkers(clients int) error
- func (svc *Intermediate) Workers() (clients int)
- type Mock
- func (svc *Mock) OnChangedEnabled(ctx context.Context) (err error)
- func (svc *Mock) OnChangedMaxClients(ctx context.Context) (err error)
- func (svc *Mock) OnChangedMaxSize(ctx context.Context) (err error)
- func (svc *Mock) OnChangedPort(ctx context.Context) (err error)
- func (svc *Mock) OnChangedWorkers(ctx context.Context) (err error)
- func (svc *Mock) OnShutdown(ctx context.Context) (err error)
- func (svc *Mock) OnStartup(ctx context.Context) (err error)
- type ToDo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Intermediate ¶
Intermediate extends and customizes the generic base connector. Code generated microservices then extend the intermediate.
func NewService ¶
func NewService(impl ToDo, version int) *Intermediate
NewService creates a new intermediate service.
func (*Intermediate) Enabled ¶
func (svc *Intermediate) Enabled() (enabled bool)
Enabled determines whether the email server is started.
func (*Intermediate) MaxClients ¶
func (svc *Intermediate) MaxClients() (clients int)
MaxClients controls how many client connection can be opened in parallel. Defaults to 128.
func (*Intermediate) MaxSize ¶
func (svc *Intermediate) MaxSize() (mb int)
MaxSize is the maximum size of messages that will be accepted, in megabytes. Defaults to 10 megabytes.
func (*Intermediate) Port ¶
func (svc *Intermediate) Port() (port int)
Port is the TCP port to listen to.
func (*Intermediate) SetEnabled ¶
func (svc *Intermediate) SetEnabled(enabled bool) error
SetEnabled sets the value of the configuration property.
Enabled determines whether the email server is started.
func (*Intermediate) SetMaxClients ¶
func (svc *Intermediate) SetMaxClients(clients int) error
SetMaxClients sets the value of the configuration property.
MaxClients controls how many client connection can be opened in parallel. Defaults to 128.
func (*Intermediate) SetMaxSize ¶
func (svc *Intermediate) SetMaxSize(mb int) error
SetMaxSize sets the value of the configuration property.
MaxSize is the maximum size of messages that will be accepted, in megabytes. Defaults to 10 megabytes.
func (*Intermediate) SetPort ¶
func (svc *Intermediate) SetPort(port int) error
SetPort sets the value of the configuration property.
Port is the TCP port to listen to.
func (*Intermediate) SetWorkers ¶
func (svc *Intermediate) SetWorkers(clients int) error
SetWorkers sets the value of the configuration property.
Workers controls how many workers process incoming mail. Defaults to 8.
func (*Intermediate) Workers ¶
func (svc *Intermediate) Workers() (clients int)
Workers controls how many workers process incoming mail. Defaults to 8.
type Mock ¶
type Mock struct {
*Intermediate
}
Mock is a mockable version of the smtp.ingress.core microservice, allowing functions, event sinks and web handlers to be mocked.
func (*Mock) OnChangedEnabled ¶
OnChangedEnabled is a no op.
func (*Mock) OnChangedMaxClients ¶
OnChangedMaxClients is a no op.
func (*Mock) OnChangedMaxSize ¶
OnChangedMaxSize is a no op.
func (*Mock) OnChangedPort ¶
OnChangedPort is a no op.
func (*Mock) OnChangedWorkers ¶
OnChangedWorkers is a no op.
func (*Mock) OnShutdown ¶
OnShutdown is a no op.
type ToDo ¶
type ToDo interface { OnStartup(ctx context.Context) (err error) OnShutdown(ctx context.Context) (err error) OnChangedPort(ctx context.Context) (err error) OnChangedEnabled(ctx context.Context) (err error) OnChangedMaxSize(ctx context.Context) (err error) OnChangedMaxClients(ctx context.Context) (err error) OnChangedWorkers(ctx context.Context) (err error) }
ToDo defines the interface that the microservice must implement. The intermediate delegates handling to this interface.