wip deprecated V1

This commit is contained in:
2025-06-11 10:32:50 +02:00
parent 49a4642db2
commit 3885abbcc5
6 changed files with 32 additions and 65 deletions

View File

@ -10,6 +10,7 @@ import (
"github.com/pkg/errors"
)
// Deprecated : is no longer maintained for modules in V1
const Identifier protocol.Identifier = "v1"
const compatibleVersionConstraint = "^2.24"
@ -19,6 +20,7 @@ type Protocol struct {
dial protocol.DialFunc
}
// Deprecated : is no longer maintained for modules in V1
// Available implements protocol.Protocol.
func (p *Protocol) Available(ctx context.Context, addr string) (bool, error) {
ops := p.Operations(addr).(*Operations)
@ -53,11 +55,13 @@ func (p *Protocol) Available(ctx context.Context, addr string) (bool, error) {
return true, nil
}
// Deprecated : is no longer maintained for modules in V1
// Identifier implements protocol.Protocol.
func (p *Protocol) Identifier() protocol.Identifier {
return Identifier
}
// Deprecated : is no longer maintained for modules in V1
// Operations implements protocol.Protocol.
func (p *Protocol) Operations(addr string) protocol.Operations {
return &Operations{addr: addr, logger: p.logger, dial: p.dial}