Module logi_sink_ha

A sink which provides HA (High Availability) functionality.

Copyright © 2015-2016 Takeru Ohta <phjgt308@gmail.com>

Description

A sink which provides HA (High Availability) functionality

Data Types

option()

option() = {logger, logi:logger()} | {strategy, select_strategy()}

logger: - The logger instance which is used to report internal events of the sink process - Default: logi:default_logger()

strategy: - Peer selection strategy - Default: random

options()

options() = [option()]

peer()

peer() = #{sink => logi_sink:sink(), restart => restart_strategy()}

A peer specification

restart is optional field (default value is #{interval => {1000, 60000}}).

restart_strategy()

restart_strategy() = #{interval => timeout() | {Min::timeout(), Max::timeout()}}

Exited peer restarting strategy

select_strategy()

select_strategy() = first_available | random

Peer selection strategy: - first_available: Selects first available peer in the list - random: Selects random peer in the list

Function Index

new/2Equivalent to new(SinkId, Peers, []).
new/3

Function Details

new/2

new(SinkId::logi_sink:id(), Peers::[peer()]) -> logi_sink:sink()

Equivalent to new(SinkId, Peers, []).

new/3

new(SinkId::logi_sink:id(), Peers::[peer()], Options::options()) -> logi_sink:sink()


Generated by EDoc, Sep 27 2018, 23:13:24.