-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add transport implementation for subscription
- Loading branch information
Showing
11 changed files
with
188 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import 'package:fixnum/fixnum.dart' as fixnum; | ||
|
||
/// Stream position. | ||
typedef CentrifugeStreamPosition = ({fixnum.Int64 offset, String epoch}); |
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,51 @@ | ||
import 'package:centrifuge_dart/src/model/publication.dart'; | ||
import 'package:centrifuge_dart/src/model/stream_position.dart'; | ||
import 'package:meta/meta.dart'; | ||
|
||
/// Subscribed on channel message. | ||
@immutable | ||
final class SubcibedOnChannel { | ||
/// Subscribed on channel message. | ||
const SubcibedOnChannel({ | ||
required this.channel, | ||
required this.expires, | ||
required this.ttl, | ||
required this.recoverable, | ||
required this.since, | ||
required this.publications, | ||
required this.recovered, | ||
required this.positioned, | ||
required this.wasRecovering, | ||
required this.data, | ||
}); | ||
|
||
/// Channel name. | ||
final String channel; | ||
|
||
/// Whether channel is expired. | ||
final bool expires; | ||
|
||
/// Time to live in seconds. | ||
final DateTime? ttl; | ||
|
||
/// Whether channel is recoverable. | ||
final bool recoverable; | ||
|
||
/// Stream position. | ||
final CentrifugeStreamPosition? since; | ||
|
||
/// List of publications since last stream position. | ||
final List<CentrifugePublication> publications; | ||
|
||
/// Whether channel is recovered after stream failure. | ||
final bool recovered; | ||
|
||
/// Whether channel is positioned at last stream position. | ||
final bool positioned; | ||
|
||
/// Whether channel is recovering after stream failure. | ||
final bool wasRecovering; | ||
|
||
/// Raw data. | ||
final List<int>? data; | ||
} |
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