lite_fs

Types

The different types of events that you can get from the event stream

pub type Event {
  Init(primary_data: Primary)
  Tx(
    db: String,
    tx_id: Int,
    post_apply_checksum: Int,
    commit: Int,
    page_size: Int,
    timestamp: String,
  )
  PrimaryChange(primary_data: Primary)
}

Constructors

  • Init(primary_data: Primary)
  • Tx(
      db: String,
      tx_id: Int,
      post_apply_checksum: Int,
      commit: Int,
      page_size: Int,
      timestamp: String,
    )
  • PrimaryChange(primary_data: Primary)
pub type Message {
  Shutdown
}

Constructors

  • Shutdown
pub type Primary {
  Local
  Remote(hostname: String)
}

Constructors

  • Local
  • Remote(hostname: String)

Functions

pub fn start(
  port port: Int,
  with callback: fn(Event) -> Nil,
) -> Result(Subject(Message), StartError)

start the event listener

Search Document