Server-source library
Interaction between the stream source and each stream server is enabled by the library, which is a Go library with six main functions for modifying or adding en
Interaction between the stream source and each stream server is enabled by the server-source library, which is a Go library with six main functions for modifying or adding entries to operations.
Send data functions
When each of these functions is called, a corresponding message is generated and sent to the stream server:
- starts an atomic operation. When called, a message that amounts to saying: "start an atomic operation," is generated and sent from the stream source to the stream server.
- adds an entry to the atomic operation and returns an . When called, a message equivalent to saying: "Add an entry of this type, with this data, to the current atomic operation," is generated and sent to the stream server.
- adds an entry to the atomic operation and returns an .
- commits an operation so that its entries can be sent to stream clients. When called, a message which is tantamount to saying: "All entries associated with the current operation have been sent, the operation ends with the last sent entry," is generated and sent to the stream server.
- rolls back an atomic operation.
- updates an existing entry. This function only applies to entries for which the atomic operation has not been committed.
Query data functions
The stream source uses the following functions of the stream server-source library to get information from the stream server.
- : The stream source uses this function to query the header of a particular entry. The function returns, .
- : This function is used to get an entry that corresponds to a given entry number. It returns, .
- : The stream source uses this function to get a bookmark. The function returns, .
- : This function is used to get the first entry after a given bookmark. It returns, .
Find out more about the DATA STREAMER INTERFACE (API).
It's possible to create, using the stream source-server library, a stream source that connects with a server, opens and commits operations.
Last updated on
Protocol messages
This document gives further details on the client-server protocol messages. The stream client-server protocol messages are $ exttt $, $ exttt $, $ exttt $, $
Stream file
Next is an explanation of the stream file structure. The stream file is created in a binary format instead of a text file. It has a header page and one or more