Add cache config for configuration comparison (#5812)

This commit is contained in:
Nitish Tiwari 2018-04-13 23:45:19 +05:30 committed by GitHub
parent 75f35b926d
commit 42f775af4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -139,6 +139,8 @@ func (s *serverConfig) ConfigDiff(t *serverConfig) string {
return "Domain configuration differs"
case s.StorageClass != t.StorageClass:
return "StorageClass configuration differs"
case !reflect.DeepEqual(s.Cache, t.Cache):
return "Cache configuration differs"
case !reflect.DeepEqual(s.Notify.AMQP, t.Notify.AMQP):
return "AMQP Notification configuration differs"
case !reflect.DeepEqual(s.Notify.NATS, t.Notify.NATS):

View file

@ -580,7 +580,10 @@ type serverConfigV22 struct {
Notify notifier `json:"notify"`
}
// serverConfigV23 is just like version '22' with addition of cache field
// serverConfigV23 is just like version '22' with addition of cache field.
//
// IMPORTANT NOTE: When updating this struct make sure that
// serverConfig.ConfigDiff() is updated as necessary.
type serverConfigV23 struct {
Version string `json:"version"`