Skip to content

Commit

Permalink
Add annotation for attribute keys being depracated.
Browse files Browse the repository at this point in the history
  • Loading branch information
voidzcy committed Jan 30, 2020
1 parent 5adefa9 commit 8f38f42
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/src/main/java/io/grpc/internal/GrpcAttributes.java
Expand Up @@ -38,14 +38,23 @@ public final class GrpcAttributes {
public static final Attributes.Key<Map<String, ?>> NAME_RESOLVER_SERVICE_CONFIG =
Attributes.Key.create("service-config");

/**
* Attribute key for gRPC LB server addresses.
*
* <p>Deprecated: this will be used for grpclb specific logic, which will be moved out of core.
*/
@Deprecated
@NameResolver.ResolutionResultAttr
public static final Attributes.Key<List<EquivalentAddressGroup>> ATTR_LB_ADDRS =
Attributes.Key.create("io.grpc.grpclb.lbAddrs");

/**
* The naming authority of a gRPC LB server address. It is an address-group-level attribute,
* present when the address group is a LoadBalancer.
*
* <p>Deprecated: this will be used for grpclb specific logic, which will be moved out of core.
*/
@Deprecated
@EquivalentAddressGroup.Attr
public static final Attributes.Key<String> ATTR_LB_ADDR_AUTHORITY =
Attributes.Key.create("io.grpc.grpclb.lbAddrAuthority");
Expand Down
Expand Up @@ -129,6 +129,7 @@ public List<String> resolveTxt(String serviceConfigHostname) throws NamingExcept
return Collections.unmodifiableList(serviceConfigTxtRecords);
}

@SuppressWarnings("deprecated")
@Override
public List<EquivalentAddressGroup> resolveSrv(
AddressResolver addressResolver, String grpclbHostname) throws Exception {
Expand Down

0 comments on commit 8f38f42

Please sign in to comment.