Service is an implementation of the Clouditor Orchestrator service
| 83 | |
| 84 | // Service is an implementation of the Clouditor Orchestrator service |
| 85 | type Service struct { |
| 86 | orchestrator.UnimplementedOrchestratorServer |
| 87 | |
| 88 | // CertificationTargetHooks is a list of hook functions that can be used to inform |
| 89 | // about updated CertificationTargets |
| 90 | CertificationTargetHooks []orchestrator.CertificationTargetHookFunc |
| 91 | |
| 92 | // auditScopeHooks is a list of hook functions that can be used to inform about updated Audit Scopes |
| 93 | auditScopeHooks []orchestrator.AuditScopeHookFunc |
| 94 | |
| 95 | // hookMutex is used for (un)locking hook calls |
| 96 | hookMutex sync.RWMutex |
| 97 | |
| 98 | // Hook |
| 99 | AssessmentResultHooks []assessment.ResultHookFunc |
| 100 | // mu is used for (un)locking result hook calls |
| 101 | mu sync.Mutex |
| 102 | |
| 103 | storage persistence.Storage |
| 104 | |
| 105 | metricsFile string |
| 106 | |
| 107 | // loadMetricsFunc is a function that is used to initially load metrics at the start of the orchestrator |
| 108 | loadMetricsFunc func() ([]*assessment.Metric, error) |
| 109 | |
| 110 | catalogsFolder string |
| 111 | |
| 112 | // loadCatalogsFunc is a function that is used to initially load catalogs at the start of the orchestrator |
| 113 | loadCatalogsFunc func() ([]*orchestrator.Catalog, error) |
| 114 | |
| 115 | events chan *orchestrator.MetricChangeEvent |
| 116 | |
| 117 | // authz defines our authorization strategy, e.g., which user can access which certification target and associated |
| 118 | // resources, such as evidences and assessment results. |
| 119 | authz service.AuthorizationStrategy |
| 120 | } |
| 121 | |
| 122 | func init() { |
| 123 | log = logrus.WithField("component", "orchestrator") |
nothing calls this directly
no outgoing calls
no test coverage detected