From 4e29e4044fba1bae0be6a117b1a331f935659dd8 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 22 Apr 2022 21:02:18 +0100 Subject: [PATCH] deprecate Negotiator.NegotiateLazy (#249) --- core/protocol/switch.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/protocol/switch.go b/core/protocol/switch.go index f3ac369b..e00ba1ad 100644 --- a/core/protocol/switch.go +++ b/core/protocol/switch.go @@ -51,7 +51,6 @@ type Router interface { // Negotiator is a component capable of reaching agreement over what protocols // to use for inbound streams of communication. type Negotiator interface { - // NegotiateLazy will return the registered protocol handler to use // for a given inbound stream, returning as soon as the protocol has been // determined. Returns an error if negotiation fails. @@ -59,6 +58,8 @@ type Negotiator interface { // NegotiateLazy may return before all protocol negotiation responses have been // written to the stream. This is in contrast to Negotiate, which will block until // the Negotiator is finished with the stream. + // + // Deprecated: use Negotiate instead. NegotiateLazy(rwc io.ReadWriteCloser) (io.ReadWriteCloser, string, HandlerFunc, error) // Negotiate will return the registered protocol handler to use for a given