fix: resolve two TODO items

As far as I can tell, we're already doing item 7, and item 8 was a
one-line fix with no backcompat concerns
This commit is contained in:
Benjamin Pollack
2026-02-23 19:42:43 +00:00
parent e5183ef0de
commit 0f4fc78b42
2 changed files with 7 additions and 2 deletions
-2
View File
@@ -6,5 +6,3 @@ TODO
- Remove the legacy package by folding all of its logic into the current package
- Add an RPC test
- Implement support for AgentSession.ID()
- Endpoint.ID() should return the endpoint's API resource identifier but right now it just returns a random unique identifier unrelated to the API resource
- Endpoint.Wait() which can be used to wait until an endpoint stops
+7
View File
@@ -31,6 +31,9 @@ type Endpoint interface {
// Done returns a channel that is closed when the endpoint stops.
Done() <-chan struct{}
// Wait blocks until the endpoint stops.
Wait()
// ID returns the unique endpoint identifier assigned by the ngrok cloud service.
ID() string
@@ -86,6 +89,10 @@ func (e *baseEndpoint) Done() <-chan struct{} {
return e.doneChannel
}
func (e *baseEndpoint) Wait() {
<-e.doneChannel
}
func (e *baseEndpoint) ID() string {
return e.id
}