Skip to content

Commit 5fcd20b

Browse files
authored
feat(sdk)!: Remove StreamrClient#findOperators() (#2876)
**This is a breaking change as this changes the API** Removed the method from public API by annotating it as `@internal`. The API of this method and some other related methods may change soon (NET-1374). ## Background The method signature use internal `StreamID` type. If we re-include the method to public API that parameter type should be changed to `streamIdOrPath: string`. Also the magic numbers (`maxQueryResults`, `maxHeartbeatAgeHours`) should be configurable, or the method name should reflect the fact that it finds only a subset of operators? Note also that query currently excludes non-TLS operator nodes. We could either add a configuration option to handle that exclusion or rename the method (e.g. `findConnectableOperators()`).
1 parent c051b0d commit 5fcd20b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Changes before Tatum release are not documented in this file.
5353
- **BREAKING CHANGE:** Remove `Stream#detectFields()` method (https://github.com/streamr-dev/network/pull/2864)
5454
- **BREAKING CHANGE:** Remove `Stream#delete()` method (https://github.com/streamr-dev/network/pull/2863)
5555
- use `StreamrClient#deleteStream()` instead
56+
- **BREAKING CHANGE:** Remove `StreamrClient#findOperators()` method (https://github.com/streamr-dev/network/pull/2876)
5657
- Remove support for legacy encryption keys (https://github.com/streamr-dev/network/pull/2757)
5758
- Remove obsolete config options:
5859
- `network.node.id` (https://github.com/streamr-dev/network/pull/2777)

packages/sdk/src/StreamrClient.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,12 @@ export class StreamrClient {
758758
)
759759
}
760760

761-
/*
762-
* Discover operators that have been recently online on a given stream
761+
/**
762+
* Discover operators that have been recently online on a given stream.
763+
*
764+
* The API may change soon (NET-1374).
765+
*
766+
* @internal
763767
*/
764768
findOperators(streamId: StreamID): Promise<NetworkPeerDescriptor[]> {
765769
return this.operatorRegistry.findOperatorsOnStream(streamId, 10, 1)

0 commit comments

Comments
 (0)