30 lines
612 B
Go
30 lines
612 B
Go
|
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{}
|