DescriptionProvide an API to dart:developer to control the web server hosting the Service Protocol
- [x] Add `ServiceProtocolnfo` class to dart:developer.
- [x] Add `Service` class to dart:developer.
- [x] Add `Service.getInfo` static method to dart:developer.
- [x] Add `Service.controlWebServer` static method to dart:developer.
API:
```dart
/// Information about the service protocol.
class ServiceProtocolInfo {
/// The major version of the protocol.
final int majorVersion;
/// The minor version of the protocol.
final int minorVersion;
/// The Uri to access the service. If the web server is not running, this
/// will be null.
final Uri serverUri;
}
/// Access information about the service protocol and control the web server.
class Service {
/// Get information about the service protocol.
static Future<ServiceProtocolInfo> getInfo();
/// Control the web server that the service protocol is accessed through.
static Future<ServiceProtocolInfo> controlWebServer({bool enable: false});
}
```
... and add a randomly generated authentication token path prefix that must be passed in to access the service protocol.
Old base url:
Observatory listening on http://127.0.0.1:54804/
New base url:
Observatory listening on http://127.0.0.1:54804/<token>/
For example:
Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/
Many tools will need to be updated.
Fixes #23320
BUG=
R=asiva@google.com, rmacnak@google.com
Committed: https://github.com/dart-lang/sdk/commit/63e4f69e5e363e13b193572acb74edc4de99c0e6
Patch Set 1 #Patch Set 2 : self review #
Total comments: 1
Patch Set 3 : add authentication token path prefix #
Total comments: 2
Patch Set 4 : fix Observatory #Patch Set 5 : updated CHANGELOG.md #
Total comments: 12
Patch Set 6 : disable the auth token until we announce the breaking change #
Total comments: 5
Patch Set 7 : CHANGELOG.md merge and fatal error #
Messages
Total messages: 20 (7 generated)
|