VintageNet.Connectivity.CheckLogic (vintage_net v0.11.0) View Source

Core logic for determining internet connectivity based on check results

This module is meant to be used by InternetChecker and others for determining when to run checks and how many failures should change the network interface's state.

Link to this section Summary

Link to this section Types

Specs

state() :: %{
  connectivity: VintageNet.connection_status(),
  strikes: non_neg_integer(),
  interval: non_neg_integer() | :infinity
}

Link to this section Functions

Specs

check_failed(state()) :: state()

Specs

check_succeeded(state()) :: state()

Specs

ifdown(state()) :: state()

Specs

ifup(state()) :: state()

Specs

Initialize check state machine

Pass in the assumed connection status. This is a best guess to start things out.