@@ -12,8 +12,8 @@ import (
1212 "github.com/revanite-io/sci/pkg/layer4"
1313)
1414
15- // The vessel gets the armory in position to execute the ControlEvaluations specified in the testSuites
16- type Vessel struct {
15+ // The evaluation orchestrator gets the plugin in position to execute the specified evaluation suites
16+ type EvaluationOrchestrator struct {
1717 Service_Name string
1818 Plugin_Name string
1919 Payload interface {}
@@ -27,16 +27,16 @@ type Vessel struct {
2727
2828type DataLoader func (* config.Config ) (interface {}, error )
2929
30- func NewVessel (pluginName string , loader DataLoader , requiredVars []string ) * Vessel {
31- v := & Vessel {
30+ func NewEvaluationOrchestrator (pluginName string , loader DataLoader , requiredVars []string ) * EvaluationOrchestrator {
31+ v := & EvaluationOrchestrator {
3232 Plugin_Name : pluginName ,
3333 requiredVars : requiredVars ,
3434 loader : loader ,
3535 }
3636 return v
3737}
3838
39- func (v * Vessel ) AddEvaluationSuite (catalogId string , loader DataLoader , evaluations []* layer4.ControlEvaluation ) {
39+ func (v * EvaluationOrchestrator ) AddEvaluationSuite (catalogId string , loader DataLoader , evaluations []* layer4.ControlEvaluation ) {
4040 suite := EvaluationSuite {
4141 Catalog_Id : catalogId ,
4242 Control_Evaluations : evaluations ,
@@ -50,7 +50,7 @@ func (v *Vessel) AddEvaluationSuite(catalogId string, loader DataLoader, evaluat
5050 v .possibleSuites = append (v .possibleSuites , & suite )
5151}
5252
53- func (v * Vessel ) Mobilize () error {
53+ func (v * EvaluationOrchestrator ) Mobilize () error {
5454 v .setupConfig ()
5555 if v .config .Error != nil {
5656 return v .config .Error
@@ -60,7 +60,7 @@ func (v *Vessel) Mobilize() error {
6060 return BAD_LOADER (v .Plugin_Name , err )
6161 }
6262
63- v .config .Logger .Trace ("Setting up vessel " )
63+ v .config .Logger .Trace ("Setting up evaluation orchestrator " )
6464
6565 if len (v .possibleSuites ) == 0 {
6666 return NO_EVALUATION_SUITES ()
@@ -69,7 +69,7 @@ func (v *Vessel) Mobilize() error {
6969 v .Service_Name = v .config .ServiceName
7070
7171 if v .Plugin_Name == "" || v .Service_Name == "" {
72- return VESSEL_NAMES_NOT_SET (v .Service_Name , v .Plugin_Name )
72+ return EVALUATION_ORCHESTRATOR_NAMES_NOT_SET (v .Service_Name , v .Plugin_Name )
7373 }
7474
7575 v .config .Logger .Trace ("Mobilization beginning" )
@@ -95,7 +95,7 @@ func (v *Vessel) Mobilize() error {
9595 return v .WriteResults ()
9696}
9797
98- func (v * Vessel ) WriteResults () error {
98+ func (v * EvaluationOrchestrator ) WriteResults () error {
9999
100100 var err error
101101 var result []byte
@@ -119,7 +119,7 @@ func (v *Vessel) WriteResults() error {
119119 return nil
120120}
121121
122- func (v * Vessel ) writeResultsToFile (serviceName string , result []byte , extension string ) error {
122+ func (v * EvaluationOrchestrator ) writeResultsToFile (serviceName string , result []byte , extension string ) error {
123123 if ! strings .Contains (extension , "." ) {
124124 extension = fmt .Sprintf (".%s" , extension )
125125 }
@@ -163,7 +163,7 @@ func (v *Vessel) writeResultsToFile(serviceName string, result []byte, extension
163163}
164164
165165// SetPayload allows the user to pass data to be referenced in assessments
166- func (v * Vessel ) loadPayload () (err error ) {
166+ func (v * EvaluationOrchestrator ) loadPayload () (err error ) {
167167 payload := new (interface {})
168168 if v .loader != nil {
169169 data , err := v .loader (v .config )
@@ -187,7 +187,7 @@ func (v *Vessel) loadPayload() (err error) {
187187 return nil
188188}
189189
190- func (v * Vessel ) setupConfig () {
190+ func (v * EvaluationOrchestrator ) setupConfig () {
191191 if v .config == nil {
192192 c := config .NewConfig (v .requiredVars )
193193 v .config = & c
0 commit comments