File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -337,3 +337,23 @@ func (b *defaultEndpointGroupBuilder) validatePortOverrides(listener *agamodel.L
337337
338338 return nil
339339}
340+
341+ // buildEndpointConfiguration creates an EndpointConfiguration from a GlobalAcceleratorEndpoint
342+ // This helper function consolidates the repeated code for creating endpoint configurations
343+ func buildEndpointConfigurationFromEndpoint (endpoint * agaapi.GlobalAcceleratorEndpoint ) agamodel.EndpointConfiguration {
344+ endpointConfig := agamodel.EndpointConfiguration {
345+ EndpointID : awssdk .ToString (endpoint .EndpointID ),
346+ }
347+
348+ // Add weight if specified
349+ if endpoint .Weight != nil {
350+ endpointConfig .Weight = endpoint .Weight
351+ }
352+
353+ // Add client IP preservation setting if specified
354+ if endpoint .ClientIPPreservationEnabled != nil {
355+ endpointConfig .ClientIPPreservationEnabled = endpoint .ClientIPPreservationEnabled
356+ }
357+
358+ return endpointConfig
359+ }
You can’t perform that action at this time.
0 commit comments