mirror of https://github.com/grpc/grpc-java.git
grpclb: expose balancer address related attributes in internal accessor (#6669)
This commit is contained in:
parent
26bff62ff3
commit
295b64b5ff
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue