chore(v1): deprecated

This commit is contained in:
2025-06-11 12:20:19 +02:00
parent 5a8f4301cb
commit 2c5d1442fe
6 changed files with 50 additions and 0 deletions

View File

@ -13,6 +13,7 @@ import (
"github.com/pkg/errors"
)
// Deprecated : is no longer maintained for modules in V1
type Operations struct {
addr string
client *socketio.Client
@ -22,6 +23,7 @@ type Operations struct {
dial protocol.DialFunc
}
// Deprecated : is no longer maintained for modules in V1
// Close implements protocol.Operations.
func (o *Operations) Close(ctx context.Context) error {
o.mutex.Lock()
@ -36,12 +38,14 @@ func (o *Operations) Close(ctx context.Context) error {
return nil
}
// Deprecated : is no longer maintained for modules in V1
const (
// EventBrowserConnected is emitted after the initial connection to the
// ReachView endpoint
eventBrowserConnected = "browser connected"
)
// Deprecated : is no longer maintained for modules in V1
// Connect implements protocol.Operations.
func (o *Operations) Connect(ctx context.Context) error {
o.mutex.Lock()
@ -80,6 +84,7 @@ func (o *Operations) Connect(ctx context.Context) error {
return nil
}
// Deprecated : is no longer maintained for modules in V1
// Emit implements protocol.Operations.
func (o *Operations) Emit(ctx context.Context, mType string, message any) error {
o.mutex.RLock()
@ -96,6 +101,7 @@ func (o *Operations) Emit(ctx context.Context, mType string, message any) error
return nil
}
// Deprecated : is no longer maintained for modules in V1
// On implements protocol.Operations.
func (o *Operations) On(ctx context.Context, event string) (chan any, error) {
o.mutex.RLock()
@ -136,6 +142,7 @@ func (o *Operations) On(ctx context.Context, event string) (chan any, error) {
return out, nil
}
// Deprecated : is no longer maintained for modules in V1
// Alive implements protocol.Operations.
func (o *Operations) Alive(ctx context.Context) (bool, error) {
o.mutex.RLock()
@ -148,6 +155,7 @@ func (o *Operations) Alive(ctx context.Context) (bool, error) {
return o.client.Alive(), nil
}
// Deprecated : is no longer maintained for modules in V1
// Configuration implements protocol.Operations.
func (o *Operations) Configuration(ctx context.Context) (any, error) {
config, err := o.RequestConfiguration(ctx)
@ -162,6 +170,7 @@ const (
eventReboot = "reboot"
)
// Deprecated : is no longer maintained for modules in V1
// Reboot implements protocol.Operations.
func (o *Operations) Reboot(ctx context.Context) error {
o.mutex.RLock()
@ -212,6 +221,7 @@ const (
configurationApplyFailed = "failed"
)
// Deprecated : is no longer maintained for modules in V1
// SetBase implements protocol.Operations.
func (o *Operations) SetBase(ctx context.Context, funcs ...protocol.SetBaseOptionFunc) error {
rawConfig, err := o.Configuration(ctx)
@ -297,6 +307,7 @@ func (o *Operations) SetBase(ctx context.Context, funcs ...protocol.SetBaseOptio
return nil
}
// Deprecated : is no longer maintained for modules in V1
// GetBaseInfo implements protocol.Operations.
func (o *Operations) GetBaseInfo(ctx context.Context) (*protocol.BaseInfo, error) {
rawConfig, err := o.Configuration(ctx)
@ -353,6 +364,7 @@ type reachViewVersion struct {
Stable bool `json:"bool"`
}
// Deprecated : is no longer maintained for modules in V1
// Version implements protocol.Operations.
func (o *Operations) Version(ctx context.Context) (string, bool, error) {
res := &reachViewVersion{}
@ -363,4 +375,24 @@ func (o *Operations) Version(ctx context.Context) (string, bool, error) {
return strings.TrimSpace(res.Version), res.Stable, nil
}
// Deprecated : is no longer maintained for modules in V1
func (o *Operations) AveragePosition(ctx context.Context) (*protocol.TaskMessage, error) {
return nil, protocol.ErrUnimplemented
}
// Deprecated : is no longer maintained for modules in V1
func (o *Operations) GetNTRIPMountPoint(ctx context.Context) error {
return protocol.ErrUnimplemented
}
// Deprecated : is no longer maintained for modules in V1
func (o *Operations) SetBaseCorrections(ctx context.Context, funcs ...protocol.SetBaseCorrectionsFunc) error {
return protocol.ErrUnimplemented
}
// Deprecated : is no longer maintained for modules in V1
func (o *Operations) SetModem(ctx context.Context, funcs ...protocol.SetModemOptionsFunc) error {
return protocol.ErrUnimplemented
}
var _ protocol.Operations = &Operations{}