go-emlid/reach/client/protocol/v1/protocol.go

30 lines
612 B
Go
Raw Normal View History

2024-07-30 14:28:39 +02:00
package v1
import (
"context"
"forge.cadoles.com/cadoles/go-emlid/reach/client/protocol"
)
const Identifier protocol.Identifier = "v1"
type Protocol struct {
}
// Available implements protocol.Protocol.
func (p *Protocol) Available(ctx context.Context, addr string) (bool, error) {
return true, nil
}
// Identifier implements protocol.Protocol.
func (p *Protocol) Identifier() protocol.Identifier {
return Identifier
}
// Operations implements protocol.Protocol.
func (p *Protocol) Operations(addr string) protocol.Operations {
return &Operations{addr: addr}
}
var _ protocol.Protocol = &Protocol{}