package datakit-server

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module File.StreamSource

Sourcetype t

The type of typed streams.

Sourcetype 'a session

The type for stream sessions.

Sourceval session : 'a -> 'a session

session init creates a fresh session, whose initial value is init.

Sourceval publish : 'a session -> 'a -> unit

publish s v publishes v in the session s.

Sourceval create : 'a Fmt.t -> 'a session -> t

create pp session is a fresh file stream. Readers of the stream will first get an initial line, printed with pp, corresponding to the current session's value. Everytime the session's state is changing, a new line -- formatted with pp -- is broadcasted to all the current readers of the stream.

OCaml

Innovation. Community. Security.