ream/storage/stream

Types

pub type Stream {
  Stream(
    name: String,
    index: IndexFile,
    active_file: Option(EventFile),
    files: Map(Int, EventFile),
    base_path: String,
  )
}

Constructors

  • Stream(
      name: String,
      index: IndexFile,
      active_file: Option(EventFile),
      files: Map(Int, EventFile),
      base_path: String,
    )

Functions

pub fn add_event(stream: Stream, event_content: BitString) -> Result(
  Stream,
  Reason,
)
pub fn close(stream: Stream) -> Result(Nil, Reason)
pub fn get_base_path(path: String, name: String) -> String
pub fn get_event(stream: Stream, index: Int) -> Result(
  BitString,
  Reason,
)
pub fn open(name: String, path path: String) -> Result(
  Stream,
  Reason,
)
Search Document