682b5370c9
Also: * Finished threading replaceExistingChecks setting (from GH-4905) through service manager. * Respected the original configSource value that was used to register a service or a check when restoring persisted data. * Run several existing tests with and without central config enabled (not exhaustive yet). * Switch to ioutil.ReadFile for all types of agent persistence.
27 lines
676 B
Go
27 lines
676 B
Go
package agent
|
|
|
|
import (
|
|
"github.com/hashicorp/consul/agent/structs"
|
|
"github.com/hashicorp/consul/types"
|
|
)
|
|
|
|
// persistedCheck is used to serialize a check and write it to disk
|
|
// so that it may be restored later on.
|
|
type persistedCheck struct {
|
|
Check *structs.HealthCheck
|
|
ChkType *structs.CheckType
|
|
Token string
|
|
Source string
|
|
}
|
|
|
|
// persistedCheckState is used to persist the current state of a given
|
|
// check. This is different from the check definition, and includes an
|
|
// expiration timestamp which is used to determine staleness on later
|
|
// agent restarts.
|
|
type persistedCheckState struct {
|
|
CheckID types.CheckID
|
|
Output string
|
|
Status string
|
|
Expires int64
|
|
}
|