internal/mcp: NewClient takes Transport
Pass the client Transport to NewClient instead of Connect. Combine the ConnectionOptions with the ClientOptions. Change-Id: I3acd6cf6d5bf46666742f2a73e2acaef2057ea77 Reviewed-on: https://go-review.googlesource.com/c/tools/+/670215 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
parent
bc84c08031
commit
f8098af1c5
1 changed files with 35 additions and 28 deletions
|
|
@ -36,8 +36,8 @@ func TestSSEServer(t *testing.T) {
|
|||
|
||||
clientTransport := NewSSEClientTransport(httpServer.URL)
|
||||
|
||||
c := NewClient("testClient", "v1.0.0", nil)
|
||||
if err := c.Connect(ctx, clientTransport, nil); err != nil {
|
||||
c := NewClient("testClient", "v1.0.0", clientTransport, nil)
|
||||
if err := c.Start(ctx); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := c.Ping(ctx); err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue