github.com/outbrain/consul@v1.4.5/agent/check.go (about)

     1  package agent
     2  
     3  import (
     4  	"github.com/hashicorp/consul/agent/structs"
     5  	"github.com/hashicorp/consul/types"
     6  )
     7  
     8  // persistedCheck is used to serialize a check and write it to disk
     9  // so that it may be restored later on.
    10  type persistedCheck struct {
    11  	Check   *structs.HealthCheck
    12  	ChkType *structs.CheckType
    13  	Token   string
    14  }
    15  
    16  // persistedCheckState is used to persist the current state of a given
    17  // check. This is different from the check definition, and includes an
    18  // expiration timestamp which is used to determine staleness on later
    19  // agent restarts.
    20  type persistedCheckState struct {
    21  	CheckID types.CheckID
    22  	Output  string
    23  	Status  string
    24  	Expires int64
    25  }