refactor: reorganize project in order to include automation #1

Merged
Emmanuel BENOîT merged 19 commits from :master into master 2024-07-19 22:01:35 +02:00
2 changed files with 1 additions and 5 deletions
Showing only changes of commit 0290ef59b6 - Show all commits

View file

@ -159,7 +159,6 @@ type programFlags struct {
type checkProgram struct {
programFlags // Flags from the command line
plugin *plugin.Plugin // Plugin output state
getter certGetter // Certificate getter
certificate *x509.Certificate // X.509 certificate from the server
}
@ -338,7 +337,7 @@ func (program *checkProgram) RunCheck() {
if err != nil {
program.plugin.SetState(plugin.UNKNOWN, err.Error())
} else if program.checkNames() {
timeLeft := program.certificate.NotAfter.Sub(time.Now())
timeLeft := time.Until(program.certificate.NotAfter)
tlDays := int((timeLeft + 86399*time.Second) / (24 * time.Hour))
program.plugin.SetState(program.checkCertificateExpiry(tlDays))
program.setPerfData(tlDays)

View file

@ -149,9 +149,6 @@ func (program *checkProgram) addRttPerf(name string, value time.Duration) {
program.plugin.AddPerfData(pd)
}
func (program *checkProgram) addResponseInfo(server string, response queryResponse) {
}
// Add information about one of the servers' response to the plugin output. This includes
// the error message if the query failed or the RTT performance data if it succeeded. It
// then attempts to extract the serial from a server's response and returns it if