TUN-2111: Implement custom serialization logic for FallibleConfig and OriginConfig

This commit is contained in:
Chung-Ting Huang
2019-08-05 10:14:58 -05:00
parent 993a9bc4b9
commit fd4ab314dc
6 changed files with 289 additions and 100 deletions

View File

@@ -86,7 +86,7 @@ func (s *StreamHandler) UpdateConfig(newConfig []*pogs.ReverseProxyConfig) (fail
s.tunnelHostnameMapper.DeleteAll()
for _, tunnelConfig := range newConfig {
tunnelHostname := tunnelConfig.TunnelHostname
originSerice, err := tunnelConfig.OriginConfigUnmarshaler.OriginConfig.Service()
originSerice, err := tunnelConfig.OriginConfigJSONHandler.OriginConfig.Service()
if err != nil {
s.logger.WithField("tunnelHostname", tunnelHostname).WithError(err).Error("Invalid origin service config")
failedConfigs = append(failedConfigs, &pogs.FailedConfig{