cluster: decouple RingID from WireguardInterfaceID
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
+14
-1
@@ -1,6 +1,13 @@
|
||||
package cluster
|
||||
|
||||
import "errors"
|
||||
import (
|
||||
"errors"
|
||||
"io/fs"
|
||||
|
||||
"darvaza.org/core"
|
||||
|
||||
"git.jpi.io/amery/jpictl/pkg/rings"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrInvalidName indicates the name isn't valid
|
||||
@@ -14,3 +21,9 @@ var (
|
||||
// the intended purpose
|
||||
ErrInvalidNode = errors.New("invalid node")
|
||||
)
|
||||
|
||||
// ErrInvalidRing returns an error indicating the [rings.RingID]
|
||||
// can't be used for the intended purpose
|
||||
func ErrInvalidRing(ringID rings.RingID) error {
|
||||
return core.QuietWrap(fs.ErrInvalid, "invalid ring %v", ringID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user