func New(name, version string, oo ...OptionFunc) (*Service, error) {
	if name == "" {
		return nil, errors.New("name is required")
	}
	if version == "" {
		version = "dev"
	}
	info.UpdateName(name)
	info.UpdateVersion(version)
	s := Service{cps: []Component{}, hcf: http.DefaultHealthCheck, termSig: make(chan os.Signal, 1)}
	err := Setup(name, version)
	if err != nil {
		return nil, err
	}
	err = s.setupDefaultTracing(name, version)
	if err != nil {
		return nil, err
	}
	for _, o := range oo {
		err = o(&s)
		if err != nil {
			return nil, err
		}
	}
	httpCp, err := s.createHTTPComponent()
	if err != nil {
		return nil, err
	}
	s.cps = append(s.cps, httpCp)
	s.setupInfo()
	s.setupTermSignal()
	return &s, nil
}
New creates a new named service and allows for customization through functional options.
package patron
import (
	"context"
	"os"
	"os/signal"
	"strconv"
	"sync"
	"syscall"
	"github.com/mantzas/patron/errors"
	"github.com/mantzas/patron/info"
	"github.com/mantzas/patron/log"
	"github.com/mantzas/patron/log/zerolog"
	"github.com/mantzas/patron/sync/http"
	"github.com/mantzas/patron/trace"
	jaeger "github.com/uber/jaeger-client-go"
)
var logSetupOnce sync.Once
type Component interface {
	Run(ctx context.Context) error
	Info() map[string]interface{}
}
type Service struct {
	cps     []Component
	routes  []http.Route
	hcf     http.HealthCheckFunc
	termSig chan os.Signal
}