Address comments
This commit is contained in:
parent
731ba682f2
commit
000a84d49b
9 changed files with 65 additions and 56 deletions
|
|
@ -8,7 +8,6 @@ import (
|
|||
|
||||
"github.com/cenkalti/backoff/v4"
|
||||
"github.com/cli/cli/v2/internal/codespaces/api"
|
||||
"github.com/cli/cli/v2/internal/codespaces/rpc"
|
||||
"github.com/cli/cli/v2/pkg/liveshare"
|
||||
)
|
||||
|
||||
|
|
@ -80,16 +79,3 @@ func ConnectToLiveshare(ctx context.Context, progress progressIndicator, session
|
|||
Logger: sessionLogger,
|
||||
})
|
||||
}
|
||||
|
||||
// Helper function to connect to the internal RPC server and return an RPC invoker for it
|
||||
func CreateRPCInvoker(ctx context.Context, session *liveshare.Session, token string) (*rpc.Invoker, error) {
|
||||
ctx, cancel := context.WithTimeout(ctx, rpc.ConnectionTimeout)
|
||||
defer cancel()
|
||||
|
||||
invoker, err := rpc.Connect(ctx, session, token)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error connecting to internal server: %w", err)
|
||||
}
|
||||
|
||||
return invoker, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue