github.com/openshift/installer@v1.4.17/pkg/gather/service/entry.go (about) 1 package service 2 3 // Entry is an entry in a service entries file 4 type Entry struct { 5 // Timestamp is the time at which the entry was recorded 6 Timestamp string `json:"timestamp"` 7 // Phase is the phase of the service 8 Phase Phase `json:"phase"` 9 // Result is the result of either the service, the stage, the pre-command, or the post-command. This is only 10 // present when the phase is an ending phase. 11 Result Result `json:"result,omitempty"` 12 // Stage is the name of the stage being executed. This is only present when the phase is either StageStart or StageEnd. 13 Stage string `json:"string,omitempty"` 14 // PreCommand is the name of the pre-command being executed. This is only present when the phase is either 15 // PreCommandStart or PreCommandEnd. 16 PreCommand string `json:"preCommand,omitempty"` 17 // PostCommand is the name of the post-command being executed. This is only present when the phase is either 18 // PostCommandStart or PostCommandEnd. 19 PostCommand string `json:"postCommand,omitempty"` 20 // ErrorLine is the location where the error occurred that caused the failure. This is only present when the result 21 // is Failure. 22 ErrorLine string `json:"errorLine,omitempty"` 23 // ErrorMessage is the last few output messages from the service prior to the error. This is only present when the 24 // result is Failure. 25 ErrorMessage string `json:"errorMessage,omitempty"` 26 } 27 28 // Phase is the phase of the service. 29 type Phase string 30 31 const ( 32 // ServiceStart is the phase when the main command of the service starts. 33 ServiceStart Phase = "service start" 34 // ServiceEnd is the phase when the main command of the service ends. 35 ServiceEnd Phase = "service end" 36 // StageStart is the phase when a stage of the service starts. 37 StageStart Phase = "stage start" 38 // StageEnd is the phase when a stage of the service ends. 39 StageEnd Phase = "stage end" 40 // PreCommandStart is the phase when a pre-command of the service starts. 41 PreCommandStart Phase = "pre-command start" 42 // PreCommandEnd is the phase when a pre-command of the service ends. 43 PreCommandEnd Phase = "pre-command end" 44 // PostCommandStart is the phase when a post-command of the service starts. 45 PostCommandStart Phase = "post-command start" 46 // PostCommandEnd is the phase when a post-command of the service ends. 47 PostCommandEnd Phase = "post-command end" 48 ) 49 50 // Result is the result of either the service, the stage, the pre-command, or the post-command. 51 type Result string 52 53 const ( 54 // Success indicates that the service, stage, pre-command, or post-command was successful. 55 Success Result = "success" 56 // Failure indicates that the service, stage, pre-command, or post-command ended due to a failure. 57 Failure Result = "failure" 58 )