-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e1d1ef
commit b0c855b
Showing
9 changed files
with
250 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
namespace Fauna; | ||
|
||
/// <summary> | ||
/// Represents the options when subscribing to Fauna Streams. | ||
/// </summary> | ||
public class StreamOptions | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="StreamOptions"/> class with the specified token and cursor. | ||
/// </summary> | ||
/// <param name="token">The token returned from Fauna when the stream is created.</param> | ||
/// <param name="cursor">The cursor from the stream, must be used with the associated Token. Used to resume the stream.</param> | ||
/// <seealso href="https://docs.fauna.com/fauna/current/reference/streaming/#restart-a-stream"/> | ||
public StreamOptions(string token, string cursor) | ||
{ | ||
Token = token; | ||
Cursor = cursor; | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="StreamOptions"/> class with the specified token and start timestamp. | ||
/// </summary> | ||
/// <param name="token">The token returned from Fauna when the stream is created.</param> | ||
/// <param name="startTs">The start timestamp to use for the stream.</param> | ||
public StreamOptions(string token, long startTs) | ||
{ | ||
Token = token; | ||
StartTs = startTs; | ||
} | ||
|
||
// <summary>Token returned from Fauna when the stream is created.</summary> | ||
/// <see href="https://docs.fauna.com/fauna/current/reference/http/reference/stream/get/"/> | ||
public string? Token { get; } | ||
|
||
/// <summary>Cursor from the stream, must be used with the associated Token. Used to resume the stream.</summary> | ||
/// <see href="https://docs.fauna.com/fauna/current/reference/streaming/#restart-a-stream"/> | ||
public string? Cursor { get; } | ||
|
||
// <summary>Start timestamp from the stream, must be used with the associated Token. Used to resume the stream.</summary> | ||
/// <see href="https://docs.fauna.com/fauna/current/reference/streaming/#restart-a-stream"/> | ||
public long? StartTs { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.