Documentation
¶
Index ¶
- Variables
- type Accessor
- type Allocator
- func (a *Allocator) Allocate(namespace string, claimRef v1alpha1.IPClaimRef, ip netip.Addr) error
- func (a *Allocator) AllocateNext(namespace string, claimRef v1alpha1.IPClaimRef, version, kind string) (netip.Addr, error)
- func (a *Allocator) DryRun() Interface
- func (a *Allocator) IPFamily() corev1.IPFamily
- func (a *Allocator) Release(namespace string, ip netip.Addr) error
- type Allocators
- type Interface
- type Request
- type Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAllocated = errors.New("provided IP is already allocated") ErrNotFound = errors.New("provided IP was not found") )
Functions ¶
This section is empty.
Types ¶
type Allocator ¶
type Allocator struct {
// contains filtered or unexported fields
}
func New ¶
func New( prefixes []netip.Prefix, client v1alpha1client.CoreV1alpha1Interface, informer v1alpha1informers.IPInformer, ) (*Allocator, error)
func (*Allocator) AllocateNext ¶
type Allocators ¶
type Allocators struct {
// contains filtered or unexported fields
}
func NewAllocators ¶
func (*Allocators) AllocateCreate ¶
func (a *Allocators) AllocateCreate(obj runtime.Object, dryRun bool) (Transaction, error)
func (*Allocators) AllocateUpdate ¶
func (a *Allocators) AllocateUpdate(obj, oldObj runtime.Object, dryRun bool) (Transaction, error)
type Interface ¶
type Interface interface {
IPFamily() corev1.IPFamily
Allocate(namespace string, claimRef v1alpha1.IPClaimRef, ip netip.Addr) error
AllocateNext(namespace string, claimRef v1alpha1.IPClaimRef, version, kind string) (netip.Addr, error)
Release(namespace string, ip netip.Addr) error
DryRun() Interface
}
type Transaction ¶
type Transaction interface {
Commit()
Revert()
}
Click to show internal directories.
Click to hide internal directories.