github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/aagent/watchers/nagioswatcher/builtin_heartbeat.go (about)

     1  // Copyright (c) 2020-2021, R.I. Pienaar and the Choria Project contributors
     2  //
     3  // SPDX-License-Identifier: Apache-2.0
     4  
     5  package nagioswatcher
     6  
     7  import (
     8  	"strconv"
     9  	"time"
    10  )
    11  
    12  func (w *Watcher) builtinHeartbeat() (state State, output string, err error) {
    13  	return OK, strconv.Itoa(int(time.Now().Unix())), nil
    14  }