subnet

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSubnetCR

func CreateSubnetCR(ctx context.Context, cloud bcecloud.Interface, crdClient versioned.Interface, subnetID string) error

func DeclareSubnetHasNoMoreIP

func DeclareSubnetHasNoMoreIP(
	ctx context.Context,
	crdClient versioned.Interface,
	crdInformer crdinformers.SharedInformerFactory,
	subnetID string,
	hasNoMoreIP bool,
) error

func GetSubnet

func GetSubnet(ctx context.Context, crdClient versioned.Interface, subnetID string) (*v1alpha1.Subnet, error)

func MarkExclusiveSubnet

func MarkExclusiveSubnet(ctx context.Context, crdClient versioned.Interface, subnetID string, exclusive bool) (*v1alpha1.Subnet, error)

MarkExclusiveSubnet exclusive true : mark as a exclusive subnet

func UpdateSubnet

func UpdateSubnet(ctx context.Context, crdClient versioned.Interface, sbn *v1alpha1.Subnet) error

Types

type SubnetClientInject

type SubnetClientInject interface {
	InjectSubnetClient(sbnClient SubnetControl) error
}

SubnetClientInject sbnClient to read and write subnet

type SubnetControl

type SubnetControl interface {
	Get(name string) (*v1alpha1.Subnet, error)
	Create(ctx context.Context, name string) error
	DeclareSubnetHasNoMoreIP(ctx context.Context, subnetID string, hasNoMoreIP bool) error
}

SubnetClient Subnet control interface, through which operations on subnet objects can be initiated

type SubnetController

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

func NewSubnetController

func NewSubnetController(
	crdInformer crdinformers.SharedInformerFactory,
	crdClient versioned.Interface,
	cloud cloud.Interface,
	broadcaster record.EventBroadcaster) *SubnetController

func (*SubnetController) Create

func (sbnc *SubnetController) Create(ctx context.Context, name string) error

func (*SubnetController) DeclareSubnetHasNoMoreIP

func (sbnc *SubnetController) DeclareSubnetHasNoMoreIP(ctx context.Context, subnetID string, hasNoMoreIP bool) error

func (*SubnetController) EnsureSubnetCRExists

func (sbnc *SubnetController) EnsureSubnetCRExists(ctx context.Context, name string) error

func (*SubnetController) Get

func (sbnc *SubnetController) Get(name string) (*v1alpha1.Subnet, error)

func (*SubnetController) Run

func (sbnc *SubnetController) Run(stopCh <-chan struct{})

func (*SubnetController) SyncIPPool

func (sbnc *SubnetController) SyncIPPool(poolKey string, poolLister crdlisters.IPPoolLister) error

SyncIPPool ipam implements IPPoolHandler

func (*SubnetController) UpdateSbn

func (sbnc *SubnetController) UpdateSbn(ctx context.Context, sbn *v1alpha1.Subnet) error

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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