The idea is that, a querier can call this API anytime to verify if the service records still valid. A ServiceRemoved event will be triggered if no response in timeout.
DnsResource supports SRV record and ADDR record at this moment.
For convenience, VERIFY_RESOURCE_TIMEOUT_DEFAULT is defined for timeout.
UPDATE:
I simplified the new API based on this thought: (most) users would not make 2 calls to verify service_instance_name and hostname for one service instance. The user should be able to call just once to verify a service instance. The library will send query for both SRV and ADDR records internally.
This patch is to resolve issue #54 by implement a function to support Cache Flush on Failure Indication
A new API of
ServiceDaemon
is added:The idea is that, a querier can call this API anytime to verify if the service records still valid. A
ServiceRemoved
event will be triggered if no response intimeout
.DnsResource
supportsSRV
record andADDR
record at this moment.For convenience,
VERIFY_RESOURCE_TIMEOUT_DEFAULT
is defined fortimeout
.UPDATE:
I simplified the new API based on this thought: (most) users would not make 2 calls to verify
service_instance_name
andhostname
for one service instance. The user should be able to call just once to verify a service instance. The library will send query for both SRV and ADDR records internally.The API now is this: