Files
ssh-netbox-wrapper/internal/resolver/strategy.go
T
Sebastian Unterschütz 8d4915543e
Test / test (push) Successful in 3m36s
Release / release (push) Successful in 7m31s
v1
2026-11-17 19:00:44 +01:00

18 lines
456 B
Go

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)
}