API

This part of the documentation covers all the interfaces of AhoyHoy.

Session proxy

Client

Client is a wrapper for HTTP calls which allows to use load balancers, circuit breakers and retries.

Client Builders

ClientBuilder provides convenient api for creating the specific Client instance.

Abstract class:

Client exceptions

Load Balancers

There are two load balancing algorithms available for now:

  • random
  • round robin

Base class

Load blancers algorithms

Load blancers exceptions

Providers

Providers exist to give lists of hosts

Base class

List Provider

Retries

Circuit breaker

Service discovery

Endpoint

Endpoint is a derivative class from the Circuit. It delegates all HTTP calls ot the session (which is one of the Endpoint’s attributes), but can also keep a state. If Endpoint was called and request failed, it’ll change its state from closed to open.

Another feature of Endpoint is callbacks. It accepts pre-, post- and exception- callbacks, which allows to do corresponding actions with request, response and exceptions handling.