Documentation
¶
Overview ¶
Package dataplane models Podmin's IPv6 service dataplane.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnsupported is returned when dataplane activation is unavailable. ErrUnsupported = errors.New("IPv6 service eBPF dataplane activation is unsupported") // ErrInvalidSnapshot is returned for an invalid complete snapshot. ErrInvalidSnapshot = errors.New("invalid dataplane snapshot") )
Functions ¶
Types ¶
type BackendValue ¶
BackendValue is the map representation of a ready endpoint.
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler owns one unpinned dataplane lifecycle.
func New ¶
func New(podPrefix netip.Prefix) *Reconciler
New creates an inactive dataplane reconciler.
func (*Reconciler) Close ¶
func (r *Reconciler) Close() error
Close releases the unpinned dataplane state.
func (*Reconciler) Reconcile ¶
func (r *Reconciler) Reconcile(ctx context.Context, snapshot Snapshot) error
Reconcile validates and takes ownership of a complete snapshot before platform activation.
func (*Reconciler) Tables ¶
func (r *Reconciler) Tables() Tables
Tables returns an ownership-safe copy of the currently active map model.
func (*Reconciler) TriggerRefresh ¶
func (r *Reconciler) TriggerRefresh()
TriggerRefresh requests asynchronous interface discovery when the dataplane is active.
type ServiceKey ¶
ServiceKey is the exact key installed in the service lookup map.
type ServiceValue ¶
ServiceValue identifies a contiguous range in the backend map.
type Tables ¶
type Tables struct {
NodeIPv6 [16]byte
Services map[ServiceKey]ServiceValue
Backends []BackendValue
}
Tables are immutable userspace map contents ready for kernel publication.
func (Tables) SelectBackend ¶
func (t Tables) SelectBackend(key ServiceKey, flow []byte) (BackendValue, bool)
SelectBackend deterministically selects a backend for opaque flow bytes.