func (o *orcheImpl) Start(deviceIDPath string, platform string, executionType string) {
	resourceMonitorImpl.StartMonitoringResource()
	o.discoverIns.StartDiscovery(deviceIDPath, platform, executionType)
	o.storageIns.StartStorage("")
	o.watcher.Watch(o)
	o.Ready = true
	time.Sleep(1000)
}
Start runs the orchestration service itself
package orchestrationapi
import (
	"errors"
	"time"
	"github.com/lf-edge/edge-home-orchestration-go/internal/common/logmgr"
	"github.com/lf-edge/edge-home-orchestration-go/internal/controller/storagemgr"
	"github.com/lf-edge/edge-home-orchestration-go/internal/common/commandvalidator"
	"github.com/lf-edge/edge-home-orchestration-go/internal/common/networkhelper"
	"github.com/lf-edge/edge-home-orchestration-go/internal/common/requestervalidator"
	"github.com/lf-edge/edge-home-orchestration-go/internal/common/resourceutil"
	"github.com/lf-edge/edge-home-orchestration-go/internal/common/types/configuremgrtypes"
	"github.com/lf-edge/edge-home-orchestration-go/internal/controller/configuremgr"
	"github.com/lf-edge/edge-home-orchestration-go/internal/controller/discoverymgr"
	"github.com/lf-edge/edge-home-orchestration-go/internal/controller/scoringmgr"
	"github.com/lf-edge/edge-home-orchestration-go/internal/controller/securemgr/verifier"
	"github.com/lf-edge/edge-home-orchestration-go/internal/controller/servicemgr"
	"github.com/lf-edge/edge-home-orchestration-go/internal/controller/servicemgr/executor"
	"github.com/lf-edge/edge-home-orchestration-go/internal/controller/servicemgr/notification"
	"github.com/lf-edge/edge-home-orchestration-go/internal/restinterface/client"
)
const logtag = "Orchestration"
type Orche interface {
	Start(deviceIDPath string, platform string, executionType string)
}
type OrcheExternalAPI interface {
	RequestService(serviceInfo ReqeustService) ResponseService
	verifier.Conf
}
type OrcheInternalAPI interface {
	configuremgr.Notifier
	ExecuteAppOnLocal(appInfo map[string]interface{})
	HandleNotificationOnLocal(serviceID float64, status string) error
	GetScore(target string) (scoreValue float64, err error)
	GetOrchestrationInfo() (platform string, executionType string, serviceList []string, err error)
	HandleDeviceInfo(deviceID string, virtualAddr string, privateAddr string)
	GetScoreWithResource(target map[string]interface{}) (scoreValue float64, err error)
	GetResource(target string) (resourceMsg map[string]interface{}, err error)
}
var (
	orcheIns            *orcheImpl
	resourceMonitorImpl resourceutil.Monitor
	log                 = logmgr.GetInstance()
)
func init() {
	orcheIns = new(orcheImpl)
	orcheIns.networkhelper = networkhelper.GetInstance()
}
func GetExternalAPI() (OrcheExternalAPI, error) {
	if !orcheIns.Ready {
		return orcheIns, errors.New("orchestration engine does not ready")
	}
	return orcheIns, nil
}
func GetInternalAPI() (OrcheInternalAPI, error) {
	if !orcheIns.Ready {
		return orcheIns, errors.New("orchestration engine does not ready")
	}
	return orcheIns, nil
}
func getOrcheImple() *orcheImpl {
	return orcheIns
}
type OrchestrationBuilder struct {
	isSetScoring bool
	scoringIns   scoringmgr.Scoring
	isSetVerifierConf bool
	verifierIns       verifier.Conf
	isSetDiscovery bool
	discoveryIns   discoverymgr.Discovery
	isSetStorage bool
	storageIns   storagemgr.Storage
	isSetWatcher bool
	watcherIns   configuremgr.Watcher
	isSetService bool
	serviceIns   servicemgr.ServiceMgr
	isSetExecutor bool
	executorIns   executor.ServiceExecutor
	isSetClient bool
	clientAPI   client.Clienter
}
func (o *OrchestrationBuilder) SetVerifierConf(d verifier.Conf) {
	o.isSetVerifierConf = true
	o.verifierIns = d
}
func (o *OrchestrationBuilder) SetScoring(s scoringmgr.Scoring) {
	o.isSetScoring = true
	o.scoringIns = s
}
func (o *OrchestrationBuilder) SetDiscovery(d discoverymgr.Discovery) {
	o.isSetDiscovery = true
	o.discoveryIns = d
}
func (o *OrchestrationBuilder) SetStorage(d storagemgr.Storage) {
	o.isSetStorage = true
	o.storageIns = d
}
func (o *OrchestrationBuilder) SetWatcher(w configuremgr.Watcher) {
	o.isSetWatcher = true
	o.watcherIns = w
}
func (o *OrchestrationBuilder) SetService(s servicemgr.ServiceMgr) {
	o.isSetService = true
	o.serviceIns = s
}
func (o *OrchestrationBuilder) SetExecutor(e executor.ServiceExecutor) {
	o.isSetExecutor = true
	o.executorIns = e
}
func (o *OrchestrationBuilder) SetClient(c client.Clienter) {
	o.isSetClient = true
	o.clientAPI = c
}
func (o OrchestrationBuilder) Build() Orche {
	if !o.isSetWatcher || !o.isSetDiscovery || !o.isSetScoring ||
		!o.isSetService || !o.isSetExecutor || !o.isSetClient ||
		!o.isSetVerifierConf || !o.isSetStorage {
		return nil
	}
	orcheIns.Ready = false
	orcheIns.scoringIns = o.scoringIns
	orcheIns.discoverIns = o.discoveryIns
	orcheIns.storageIns = o.storageIns
	orcheIns.verifierIns = o.verifierIns
	orcheIns.watcher = o.watcherIns
	orcheIns.serviceIns = o.serviceIns
	orcheIns.clientAPI = o.clientAPI
	resourceMonitorImpl = resourceutil.GetMonitoringInstance()
	orcheIns.notificationIns = notification.GetInstance()
	orcheIns.serviceIns.SetLocalServiceExecutor(o.executorIns)
	orcheIns.discoverIns.SetRestResource()
	return orcheIns
}