v1
This commit is contained in:
commit
8d4915543e
132 files changed
+20628
No files matched your search
@@ -0,0 +1,17 @@
|
||||
package resolver
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"git.zb-server.de/Sebi/ssh-netbox-wrapper/internal/netbox"
|
||||
)
|
||||
|
||||
// ErrNoIP is returned when a strategy cannot find a matching IP address.
|
||||
var ErrNoIP = errors.New("no matching IP found")
|
||||
|
||||
// Strategy is a single rule for resolving an IP address from a NetBox host entry.
|
||||
type Strategy interface {
|
||||
Name() string
|
||||
Resolve(ctx context.Context, entry *netbox.HostEntry, client *netbox.Client) (string, error)
|
||||
}
|
||||
Reference in new issue
Block a user