mirror of
https://github.com/ngrok/ngrok-go.git
synced 2026-05-17 16:50:45 +00:00
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:
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user