Class: LoadBalancerRoundRobinRule

Implementation of round robin load balancing strategy.

Methods

getNextClient

Provides an HTTP client, which is chosen according to the round robin algorithm.

Fields

  • index int(default 0)
  • Keep tracks the current point of the Client[]

getNextClient

function getNextClient(Client?[ ] loadBalanceCallerActionsArray) returns Client | ClientError
Isolated Function

Provides an HTTP client, which is chosen according to the round robin algorithm.

Parameters

  • loadBalanceCallerActionsArray Client?[ ]
  • Array of HTTP clients, which needs to be load balanced

Return Type

(Client | ClientError)

Chosen http:Client from the algorithm or else an http:ClientError for a failure in the algorithm implementation