~allenap/gwacl/remove-role-endpoints

« back to all changes in this revision

Viewing changes to management.go

  • Committer: Gavin Panella
  • Date: 2013-07-23 09:14:02 UTC
  • Revision ID: gavin@gromper.net-20130723091402-rklhxca1fgcptfaq
Improve doc for CompareInputEndpoints.

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
 
310
310
// CompareInputEndpoints attempts to compare two InputEndpoint objects in a
311
311
// way that's congruent with how Windows's Azure considers them. The name is
312
 
// ignored, as is LoadBalancerProbe. The other fields are used for comparison,
313
 
// except when LoadBalancedEndpointSetName is set, in which case LocalPort is
314
 
// ignored.
 
312
// always ignored, as is LoadBalancerProbe. When LoadBalancedEndpointSetName
 
313
// is set (not the empty string), all the fields - LocalPort, Port, Protocol,
 
314
// VIP and LoadBalancedEndpointSetName - are used for the comparison. When
 
315
// LoadBalancedEndpointSetName is the empty string, all except LocalPort -
 
316
// effectively Port, Protocol and VIP - are used for comparison.
315
317
func CompareInputEndpoints(a, b *InputEndpoint) bool {
316
318
    if a.LoadBalancedEndpointSetName == "" {
317
319
        return a.Port == b.Port && a.Protocol == b.Protocol && a.VIP == b.VIP