mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 13:55:55 +00:00
website: fix Sentinel time-of-day policy (#5930)
The policy in the time-of-day Sentinel example incorrectly references the top-level time.hour constant. This is actually the same as the time.Hour Go value, so in other words, 3600000000000 (the int64 value representing the time in nanoseconds). This is corrected by just using time.now.hour instead.
This commit is contained in:
parent
f3ae605bcb
commit
b7b1d77139
@ -85,7 +85,7 @@ key "haproxy_version" {
|
||||
sentinel {
|
||||
code = <<EOF
|
||||
import "time"
|
||||
main = rule { time.hour > 8 and time.hour < 17 }
|
||||
main = rule { time.now.hour > 8 and time.now.hour < 17 }
|
||||
EOF
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user