grpc-java-etcd-nameresolver icon indicating copy to clipboard operation
grpc-java-etcd-nameresolver copied to clipboard

etcd nameresolver for grpc-java

With target URI:

etcd://hostname:port/my_service

And these KVs:

# the value won't make any different
etcdctl put /my_service/group1/127.0.0.1:8080 1
etcdctl put /my_service/group1/127.0.0.1:8081 1
etcdctl put /my_service/group2/127.0.0.1:8082 1

Will resolve to:

List[
EquivalentAddressGroup { addresses: [127.0.0.1:8080, 127.0.0.1:8081]},
EquivalentAddressGroup { addresses: [127.0.0.1:8082]}
]

Build from source:

./gradlew build
# then grab the jar file on directory ./build/libs/