Package com.networknt.consul.client
Interface ConsulClient
-
- All Known Implementing Classes:
ConsulClientImpl
public interface ConsulClient
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
checkFail(String serviceId, String token)
Set specific serviceId status as failvoid
checkPass(String serviceId, String token)
Set specific serviceId status as passConsulResponse<List<ConsulService>>
lookupHealthService(String serviceName, String tag, long lastConsulIndex, String token)
get latest service list with a tag filter and a security tokenvoid
registerService(ConsulService service, String token)
register a consul servicevoid
unregisterService(String serviceid, String token)
unregister a consul service
-
-
-
Method Detail
-
checkPass
void checkPass(String serviceId, String token)
Set specific serviceId status as pass- Parameters:
serviceId
- service idtoken
- ACL token for consul
-
checkFail
void checkFail(String serviceId, String token)
Set specific serviceId status as fail- Parameters:
serviceId
- service idtoken
- ACL token for consul
-
registerService
void registerService(ConsulService service, String token)
register a consul service- Parameters:
service
- service objecttoken
- ACL token for consul
-
unregisterService
void unregisterService(String serviceid, String token)
unregister a consul service- Parameters:
serviceid
- service idtoken
- ACL token for consul
-
lookupHealthService
ConsulResponse<List<ConsulService>> lookupHealthService(String serviceName, String tag, long lastConsulIndex, String token)
get latest service list with a tag filter and a security token- Parameters:
serviceName
- service namelastConsulIndex
- last consul indextag
- tag that is used for filteringtoken
- consul token for security- Returns:
- T
-
-