func getSignalTestConfig() *App {
	service, _ := services.NewService(
		"test-service", 1, 1, 1, nil, nil, &NoopServiceBackend{})
	app := EmptyApp()
	app.Command = utils.ArgsToCmd([]string{
		"./testdata/test.sh",
		"interruptSleep"})
	app.StopTimeout = 5
	app.Services = []*services.Service{service}
	return app
}
Example #2
0
// createTelemetryService ...
func createTelemetryService(t *telemetry.Telemetry, discoveryService discovery.ServiceBackend) (*services.Service, error) {
	// create a new service for Telemetry
	svc, err := services.NewService(
		t.ServiceName,
		t.Poll,
		t.Port,
		t.TTL,
		t.Interfaces,
		t.Tags,
		discoveryService)
	if err != nil {
		return nil, err
	}
	return svc, nil
}