deprecate Negotiator.NegotiateLazy (#249)

This commit is contained in:
Marten Seemann 2022-04-22 21:02:18 +01:00 committed by GitHub
parent c8ec46127f
commit 4e29e4044f
1 changed files with 2 additions and 1 deletions

View File

@ -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