-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve DSPS Readme and remove todos.
Change-Id: Id82ad846dd566306d41db211d9ae9a9370192306 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336540 Commit-Queue: Dan Chevalier <danchevalier@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
- Loading branch information
Dan Chevalier
authored and
Commit Queue
committed
Nov 16, 2023
1 parent
dd03188
commit 272b9d2
Showing
5 changed files
with
43 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Copyright 2023, the Dart project authors. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
* Neither the name of Google LLC nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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 |
---|---|---|
@@ -1,30 +1,24 @@ | ||
|
||
An unlisted package for sharing code for Service Events and stream management between Dart SDK internal services. | ||
An unlisted package for sharing code for service events and stream management between Dart SDK internal services. | ||
|
||
The Dart Developer Service and Dart Tooling Daemon are the main consumers of this package. | ||
|
||
**Expected SLO**: this package is maintained for our own tooling; we may not be able to respond to all issues and may only address the ones that we ourselves encounter. | ||
|
||
## Features | ||
## Details | ||
|
||
* Stream Manager | ||
* Helpers for managing streams that listeners can subscribe to. | ||
* Service Events | ||
* Helpers for setting up services that clients can call methods from. | ||
|
||
## Getting started | ||
|
||
TODO(@CoderDake): List prerequisites and provide or point to information on how to | ||
start using the package. | ||
This package helps handle some of the plumbing required to setup client communication for a service. The main behavior that it helps with is: | ||
- `StreamManager` | ||
- allows a client to subscribe/cancel to a stream with `streamListen`/`streamCancel`. | ||
- allows a client to post a message to a stream with `postEvent`. | ||
- `Client`, an interface that ensures the client is equipped to: | ||
- handle method requests with `sendRequest`. | ||
- handle receiving a message sent to a stream with `streamNotify`. | ||
- `ClientManager`, keeps track of clients connected to a service. | ||
- `addClient` should be called when a client connects to your service. | ||
- `removeClient` should be called when it disconnects. | ||
|
||
## Usage | ||
|
||
### Stream Manager | ||
TODO(@CoderDake): add Stream Manager Usage | ||
|
||
### Service Events | ||
TODO(@CoderDake): add Service Event Usage | ||
|
||
## Additional information | ||
|
||
TODO(@CoderDake): Fill out Additional information | ||
To see an example of how `dart_service_protocol_shared` is used see: | ||
* [Dart Developer Service](https://github.com/dart-lang/sdk/tree/main/pkg/dds) |
7 changes: 0 additions & 7 deletions
7
pkg/dart_service_protocol_shared/example/dart_service_protocol_shared.dart
This file was deleted.
Oops, something went wrong.
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