Documentation
¶
Overview ¶
Package test adds helper utilities for testing run.Group enabled services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IRQService ¶
IRQService is a run.Service and io.Closer implementation. It can be registered with run.Group and calling Close will initiate shutdown of the run.Group. This is primarily used for unit tests of run.Group enabled services and handlers.
func NewIRQService ¶
func NewIRQService(cleanup func()) IRQService
NewIRQService returns a IRQService for usage in run.Group tests. Use the Close() method to shutdown a run.Group. The GracefulStop() method will be called automatically when run.Group is shutting down. Both Serve() and GracefulStop() should not be called outside the internal run.Group logic as run.Service is to be managed by run.Group.
type Svc ¶ added in v0.1.1
Svc allows one to quickly bootstrap a run.GroupService from simple functions. This is especially useful for unit tests.
func (Svc) GracefulStop ¶ added in v0.1.1
func (t Svc) GracefulStop()
GracefulStop implements run.Service.