store

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeStore

type FakeStore struct {
	// contains filtered or unexported fields
}

FakeStore for testdata

func NewFakeStore

func NewFakeStore(name string, ranges []lbv1.Range) *FakeStore

func (*FakeStore) Close

func (f *FakeStore) Close() error

func (*FakeStore) GetByID

func (f *FakeStore) GetByID(applicantID, _ string) []net.IP

func (*FakeStore) LastReservedIP

func (f *FakeStore) LastReservedIP(_ string) (net.IP, error)

func (*FakeStore) Lock

func (f *FakeStore) Lock() error

func (*FakeStore) Release

func (f *FakeStore) Release(ip net.IP) error

func (*FakeStore) ReleaseByID

func (f *FakeStore) ReleaseByID(applicantID, _ string) error

func (*FakeStore) Reserve

func (f *FakeStore) Reserve(applicantID, _ string, ip net.IP, _ string) (bool, error)

func (*FakeStore) Unlock

func (f *FakeStore) Unlock() error

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is a CRD store that records the allocated IP in the status of IPPool CR

func New

func New(ipPoolName string, ipPoolCache ctllbv1.IPPoolCache, ipPoolClient ctllbv1.IPPoolClient) *Store

func (*Store) Close

func (s *Store) Close() error

func (*Store) GetByID

func (s *Store) GetByID(applicantID, _ string) []net.IP

func (*Store) LastReservedIP

func (s *Store) LastReservedIP(_ string) (net.IP, error)

func (*Store) Lock

func (s *Store) Lock() error

func (*Store) Release

func (s *Store) Release(ip net.IP) error

func (*Store) ReleaseByID

func (s *Store) ReleaseByID(applicantID, _ string) error

func (*Store) Reserve

func (s *Store) Reserve(applicantID, _ string, ip net.IP, _ string) (bool, error)

func (*Store) Unlock

func (s *Store) Unlock() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL