FIX.Session.Config (fix_session v0.1.2)

Copy Markdown View Source

Validated configuration for one initiator FIX session.

Build with new!/1. Required fields identify the session and the counterparty endpoint; everything else has a working default:

  • :session_id — term identifying the logical session in the store
  • :host, :port — counterparty endpoint
  • :sender_comp_id, :target_comp_id — SenderCompID(49) and TargetCompID(56) as sent by this side

:heartbeat_interval is HeartBtInt(108) in seconds; 0 disables both idle timers. :store_ref defaults to the store module itself, which matches FIX.Session.Store.ETS running with its default named table.

Summary

Functions

Builds a validated config from options.

Types

t()

@type t() :: %FIX.Session.Config{
  app: module() | nil,
  begin_string: binary(),
  connect_timeout: pos_integer(),
  default_appl_ver_id: binary() | nil,
  dictionary: module(),
  heartbeat_interval: non_neg_integer(),
  host: binary() | charlist() | :inet.ip_address(),
  logon_timeout: pos_integer(),
  logout_timeout: pos_integer(),
  name: atom() | :gen_statem.server_name() | nil,
  port: :inet.port_number(),
  reconnect_interval: pos_integer(),
  reset_on_logon: boolean(),
  sender_comp_id: binary(),
  session_id: term(),
  store: module(),
  store_ref: term(),
  target_comp_id: binary(),
  transport: module(),
  transport_options: keyword()
}

Functions

new!(options)

@spec new!(keyword()) :: t()

Builds a validated config from options.

Raises ArgumentError on missing required fields, unknown fields, or values of the wrong type.