Interface ConsulClient

  • All Known Implementing Classes:
    ConsulClientImpl

    public interface ConsulClient
    • Method Detail

      • checkPass

        void checkPass​(String serviceId,
                       String token)
        Set specific serviceId status as pass
        Parameters:
        serviceId - service id
        token - ACL token for consul
      • checkFail

        void checkFail​(String serviceId,
                       String token)
        Set specific serviceId status as fail
        Parameters:
        serviceId - service id
        token - ACL token for consul
      • registerService

        void registerService​(ConsulService service,
                             String token)
        register a consul service
        Parameters:
        service - service object
        token - ACL token for consul
      • unregisterService

        void unregisterService​(String serviceid,
                               String token)
        unregister a consul service
        Parameters:
        serviceid - service id
        token - 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 name
        lastConsulIndex - last consul index
        tag - tag that is used for filtering
        token - consul token for security
        Returns:
        T