Module resty.cassandra.policies.reconnection.const

Constant reconnection policy.

This policy will allow the cluster module to retry an unhealthy node after a given, constant delay.

Info:

  • Author: thibaultcha

Functions

new (delay) Create a constant reconnection policy.


Functions

new (delay)
Create a constant reconnection policy. Instanciates a constant reconnection policy for resty.cassandra.cluster

Parameters:

  • delay number Time to wait before trying to reconnect to an unhealthy node, in milliseconds.

Returns:

    table policy: A constant reconnection policy.

Usage:

    local Cluster = require "resty.cassandra.cluster"
    local const_reconn = require "resty.cassandra.policies.reconnection.const"
    
    local policy = const_reconn.new(60000) -- 1 min
    local cluster = assert(Cluster.new {
      reconn_policy = policy
    })
generated by LDoc 1.4.6 Last updated 2021-02-18 11:29:23