Switch StaticSystemView values to pointers, to support updating

This commit is contained in:
Jeff Mitchell
2015-09-01 08:56:31 -04:00
parent b86f252c77
commit 6e0cee3ef4
3 changed files with 16 additions and 12 deletions

View File

@@ -15,14 +15,14 @@ type SystemView interface {
}
type StaticSystemView struct {
DefaultLeaseTTLVal time.Duration
MaxLeaseTTLVal time.Duration
DefaultLeaseTTLVal *time.Duration
MaxLeaseTTLVal *time.Duration
}
func (d *StaticSystemView) DefaultLeaseTTL() time.Duration {
return d.DefaultLeaseTTLVal
return *d.DefaultLeaseTTLVal
}
func (d *StaticSystemView) MaxLeaseTTL() time.Duration {
return d.MaxLeaseTTLVal
return *d.MaxLeaseTTLVal
}