Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
demmer committed Mar 22, 2024
1 parent 8dd5c0f commit bb3a83c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion go/vt/vtgateproxy/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ type JSONGateConfigDiscovery struct {
func (b *JSONGateConfigDiscovery) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) {
attrs := target.URL.Query()

// If the config specifies a pool type attribute, then the caller must supply it in the connection
// attributes, otherwise reject the request.
poolType := ""
if *poolTypeAttr != "" {
poolType = attrs.Get(*poolTypeAttr)
Expand All @@ -83,7 +85,7 @@ func (b *JSONGateConfigDiscovery) Build(target resolver.Target, cc resolver.Clie
}
}

// affinity is optional
// Affinity on the other hand is just an optimization
affinity := ""
if *affinityAttr != "" {
affinity = attrs.Get(*affinityAttr)
Expand Down

0 comments on commit bb3a83c

Please sign in to comment.