mcp: make transports open structs
As described in #272, there is really no reason for transports to be closed structs with constructors, since their state must be established by a call to Connect. Making them open structs simplifies their APIs, and means that all transports can be extended in the future: we don't have to create empty Options structs just for the purpose of future compatibility. For now, the related constructors and options structs are simply deprecated (with go:fix directives where possible). A future CL will remove them prior to the v1.0.0 release. For #272
This commit is contained in:
parent
679f777825
commit
e097918484
1 changed files with 307 additions and 251 deletions
|
|
@ -774,7 +774,7 @@ func TestNoJSONNull(t *testing.T) {
|
|||
|
||||
// Collect logs, to sanity check that we don't write JSON null anywhere.
|
||||
var logbuf safeBuffer
|
||||
ct = NewLoggingTransport(ct, &logbuf)
|
||||
ct = &LoggingTransport{Transport: ct, Writer: &logbuf}
|
||||
|
||||
s := NewServer(testImpl, nil)
|
||||
ss, err := s.Connect(ctx, st, nil)
|
||||
|
|
|
|||
Loading…
Reference in a new issue