Skip to content

Commit

Permalink
remove some more dead conversion logic
Browse files Browse the repository at this point in the history
  • Loading branch information
rboyer committed Feb 24, 2021
1 parent 0ace7c8 commit 629547a
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions agent/xds/version_compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,44 +317,6 @@ func convertTypedConfigsToV2(pbuf *proto.Buffer, pb proto.Message) error {
}
return nil
case *envoy_route_v2.RetryPolicy:
if x.RetryPriority != nil {
if err := convertTypedConfigsToV2(pbuf, x.RetryPriority); err != nil {
return fmt.Errorf("%T: %w", x, err)
}
}
for _, pred := range x.RetryHostPredicate {
if err := convertTypedConfigsToV2(pbuf, pred); err != nil {
return fmt.Errorf("%T: %w", x, err)
}
}
return nil
case *envoy_route_v2.RetryPolicy_RetryPriority:
if x.ConfigType != nil {
tc, ok := x.ConfigType.(*envoy_route_v2.RetryPolicy_RetryPriority_TypedConfig)
if !ok {
return fmt.Errorf("%T: ConfigType type %T not handled", x, x.ConfigType)
}
if tc.TypedConfig != nil {
// TODO: add some of these?
if err := convertTypedConfigsToV2(pbuf, tc.TypedConfig); err != nil {
return fmt.Errorf("%T: %w", x, err)
}
}
}
return nil
case *envoy_route_v2.RetryPolicy_RetryHostPredicate:
if x.ConfigType != nil {
tc, ok := x.ConfigType.(*envoy_route_v2.RetryPolicy_RetryHostPredicate_TypedConfig)
if !ok {
return fmt.Errorf("%T: ConfigType type %T not handled", x, x.ConfigType)
}
if tc.TypedConfig != nil {
// TODO: add some of these?
if err := convertTypedConfigsToV2(pbuf, tc.TypedConfig); err != nil {
return fmt.Errorf("%T: %w", x, err)
}
}
}
return nil
case *envoy_http_v2.HttpFilter:
if x.ConfigType != nil {
Expand Down

0 comments on commit 629547a

Please sign in to comment.