Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAtLeastOneServiceFailedToStart = errors.New("at least one service failed to start")
Functions ¶
func WiredStructPtrToMap ¶
Extract IService fields of a struct which is supposed to be a result of wire to a map[string]IService
Types ¶
type IServicesController ¶
type IServicesController interface { // PrepareAndRun services (IService) in separate goroutines // If any service fails then // Run() is called with cancelled context for every started service // errors.Is(ErrAtLeastOneServiceFailedToStart, err) // If all servies are ok join() should be called to join services // join() waits ctx and then waits for all services PrepareAndRun(ctx context.Context, services map[string]IService) (join func(ctx context.Context), err error) }
IServiceFactory is a factory for IService
Click to show internal directories.
Click to hide internal directories.