feat: centralize app release configuration
This commit is contained in:
@@ -20,6 +20,7 @@ const (
|
||||
configEventDictionaryUpdated = "dictionary.updated"
|
||||
configEventThirdPartyUpdated = "third_party.updated"
|
||||
configEventRegistrationUpdated = "registration.config.updated"
|
||||
configEventAppReleaseUpdated = "app.release.updated"
|
||||
)
|
||||
|
||||
type configEventPayload struct {
|
||||
@@ -86,10 +87,13 @@ func executeKafkaConfigEvent(envelope kafkaEnvelope) error {
|
||||
store.InvalidateThirdPartyConfigCache(payload.Group)
|
||||
case configEventRegistrationUpdated:
|
||||
store.InvalidateRegistrationConfigCache()
|
||||
case configEventAppReleaseUpdated:
|
||||
store.InvalidateAppReleaseConfigCache()
|
||||
default:
|
||||
store.InvalidateTenantConfigCache(tenantCode, tenantID)
|
||||
store.InvalidateThirdPartyConfigCache(payload.Group)
|
||||
store.InvalidateRegistrationConfigCache()
|
||||
store.InvalidateAppReleaseConfigCache()
|
||||
}
|
||||
logs.Info.Printf("kafka config event applied: event=%s type=%s tenant=%s group=%s", envelope.EventID, envelope.EventType, tenantCode, payload.Group)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user