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, .