grpclb: expose balancer address related attributes in internal accessor (#6669)

This commit is contained in:
Chengyuan Zhang 2020-01-31 17:50:04 -08:00 committed by GitHub
parent 26bff62ff3
commit 295b64b5ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 13 deletions

View File

@ -32,18 +32,10 @@ public class InternalGrpclbConstantsAccessor {
private InternalGrpclbConstantsAccessor() { private InternalGrpclbConstantsAccessor() {
} }
/** public static Attributes.Key<List<EquivalentAddressGroup>> ATTR_LB_ADDRS =
* Sets attribute for gRPC LB address authority. GrpclbConstants.ATTR_LB_ADDRS;
*/
public static Attributes setLbAddrAuthorityAttr(
@EquivalentAddressGroup.Attr Attributes attrs, String authority) {
return attrs.toBuilder().set(GrpclbConstants.ATTR_LB_ADDR_AUTHORITY, authority).build();
}
/** @EquivalentAddressGroup.Attr
* Sets attribute for gRPC LB addresses. public static Attributes.Key<String> ATTR_LB_ADDR_AUTHORITY =
*/ GrpclbConstants.ATTR_LB_ADDR_AUTHORITY;
public static Attributes setLbAddrAttr(Attributes attrs, List<EquivalentAddressGroup> lbAddrs) {
return attrs.toBuilder().set(GrpclbConstants.ATTR_LB_ADDRS, lbAddrs).build();
}
} }