controllers

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Cred stores the Netris API usepoint.
	Cred *api.HTTPCred

	// NStorage is the instance of the Netris API in-memory storage.
	NStorage = NewStorage()
)

Functions

func L4LBMetaToNetris

func L4LBMetaToNetris(l4lbMeta *k8sv1alpha1.L4LBMeta) (*api.APILoadBalancerAdd, error)

L4LBetaToNetris converts the k8s L4LB resource to Netris type and used for add the L4LB for Netris API.

func L4LBMetaToNetrisUpdate

func L4LBMetaToNetrisUpdate(l4lbMeta *k8sv1alpha1.L4LBMeta) (*api.APIUpdateLoadBalancer, error)

L4LBMetaToNetrisUpdate converts the k8s L4LB resource to Netris type and used for update the L4LB for Netris API.

func VnetMetaToNetris

func VnetMetaToNetris(vnetMeta *k8sv1alpha1.VNetMeta) (*api.APIVNetAdd, error)

VnetMetaToNetris converts the k8s VNet resource to Netris type and used for add the VNet for Netris API.

func VnetMetaToNetrisUpdate

func VnetMetaToNetrisUpdate(vnetMeta *k8sv1alpha1.VNetMeta) (*api.APIVNetUpdate, error)

VnetMetaToNetrisUpdate converts the k8s VNet resource to Netris type and used for update the VNet for Netris API.

Types

type EBGPMetaReconciler

type EBGPMetaReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

EBGPMetaReconciler reconciles a EBGPMeta object

func (*EBGPMetaReconciler) Reconcile

func (r *EBGPMetaReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*EBGPMetaReconciler) SetupWithManager

func (r *EBGPMetaReconciler) SetupWithManager(mgr ctrl.Manager) error

type EBGPReconciler

type EBGPReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

EBGPReconciler reconciles a EBGP object

func (*EBGPReconciler) EBGPToEBGPMeta

func (r *EBGPReconciler) EBGPToEBGPMeta(ebgp *k8sv1alpha1.EBGP) (*k8sv1alpha1.EBGPMeta, error)

VnetToVnetMeta converts the VNet resource to VNetMeta type and used for add the VNet for Netris API.

func (*EBGPReconciler) Reconcile

func (r *EBGPReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*EBGPReconciler) SetupWithManager

func (r *EBGPReconciler) SetupWithManager(mgr ctrl.Manager) error

type EBGPStorage

type EBGPStorage struct {
	sync.Mutex
	EBGPs []*api.APIEBGP
}

EBGPStorage .

func NewEBGPStoragee

func NewEBGPStoragee() *EBGPStorage

NewEBGPStorage .

func (*EBGPStorage) Download

func (p *EBGPStorage) Download() error

Download .

func (*EBGPStorage) FindByID

func (p *EBGPStorage) FindByID(id int) (*api.APIEBGP, bool)

FindByID .

func (*EBGPStorage) GetAll

func (p *EBGPStorage) GetAll() []*api.APIEBGP

GetAll .

type L4LBMetaReconciler

type L4LBMetaReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

L4LBMetaReconciler reconciles a L4LBMeta object

func (*L4LBMetaReconciler) Reconcile

func (r *L4LBMetaReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*L4LBMetaReconciler) SetupWithManager

func (r *L4LBMetaReconciler) SetupWithManager(mgr ctrl.Manager) error

type L4LBReconciler

type L4LBReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

L4LBReconciler reconciles a L4LB object

func (*L4LBReconciler) L4LBToL4LBMeta

func (r *L4LBReconciler) L4LBToL4LBMeta(l4lb *k8sv1alpha1.L4LB) (*k8sv1alpha1.L4LBMeta, error)

VnetToVnetMeta converts the VNet resource to VNetMeta type and used for add the VNet for Netris API.

func (*L4LBReconciler) Reconcile

func (r *L4LBReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*L4LBReconciler) SetupWithManager

func (r *L4LBReconciler) SetupWithManager(mgr ctrl.Manager) error

type L4LBStorage

type L4LBStorage struct {
	sync.Mutex
	L4LBs []*api.APILoadBalancer
}

L4LBStorage .

func NewL4LBStorage

func NewL4LBStorage() *L4LBStorage

NewVNetStorage .

func (*L4LBStorage) Download

func (p *L4LBStorage) Download() error

Download .

func (*L4LBStorage) FindByID

func (p *L4LBStorage) FindByID(id int) (*api.APILoadBalancer, bool)

FindByID .

func (*L4LBStorage) FindByName

func (p *L4LBStorage) FindByName(name string) (*api.APILoadBalancer, bool)

FindByName .

func (*L4LBStorage) GetAll

func (p *L4LBStorage) GetAll() []*api.APILoadBalancer

GetAll .

type PortsStorage

type PortsStorage struct {
	sync.Mutex
	Ports []*api.APIPort
}

PortsStorage .

func NewPortStorage

func NewPortStorage() *PortsStorage

NewPortStorage .

func (*PortsStorage) Download

func (p *PortsStorage) Download() error

Download .

func (*PortsStorage) FindByName

func (p *PortsStorage) FindByName(name string) (*api.APIPort, bool)

FindByName .

func (*PortsStorage) GetAll

func (p *PortsStorage) GetAll() []*api.APIPort

GetAll .

type SitesStorage

type SitesStorage struct {
	sync.Mutex
	Sites []*api.APISite
}

SitesStorage .

func NewSitesStorage

func NewSitesStorage() *SitesStorage

NewSitesStorage .

func (*SitesStorage) Download

func (p *SitesStorage) Download() error

Download .

func (*SitesStorage) FindByID

func (p *SitesStorage) FindByID(id int) (*api.APISite, bool)

FindByID .

func (*SitesStorage) FindByName

func (p *SitesStorage) FindByName(name string) (*api.APISite, bool)

FindByName .

func (*SitesStorage) GetAll

func (p *SitesStorage) GetAll() []*api.APISite

GetAll .

type Storage

Storage .

func NewStorage

func NewStorage() *Storage

NewStorage .

func (*Storage) Download

func (s *Storage) Download() error

Download .

func (*Storage) DownloadWithInterval

func (s *Storage) DownloadWithInterval()

DownloadWithInterval .

type SubnetsStorage

type SubnetsStorage struct {
	sync.Mutex
	Subnets []*api.APISubnet
}

SubnetsStorage .

func NewSubnetsStorage

func NewSubnetsStorage() *SubnetsStorage

NewVNetStorage .

func (*SubnetsStorage) Download

func (p *SubnetsStorage) Download() error

Download .

func (*SubnetsStorage) FindByID

func (p *SubnetsStorage) FindByID(id int) (*api.APISubnet, bool)

FindByID .

func (*SubnetsStorage) FindByName

func (p *SubnetsStorage) FindByName(name string) (*api.APISubnet, bool)

FindByName .

func (*SubnetsStorage) GetAll

func (p *SubnetsStorage) GetAll() []*api.APISubnet

GetAll .

type TenantsStorage

type TenantsStorage struct {
	sync.Mutex
	Tenants []*api.APITenant
}

TenantsStorage .

func NewTenantsStorage

func NewTenantsStorage() *TenantsStorage

NewTenantsStorage .

func (*TenantsStorage) Download

func (p *TenantsStorage) Download() error

Download .

func (*TenantsStorage) FindByID

func (p *TenantsStorage) FindByID(id int) (*api.APITenant, bool)

FindByID .

func (*TenantsStorage) FindByName

func (p *TenantsStorage) FindByName(name string) (*api.APITenant, bool)

FindByName .

func (*TenantsStorage) GetAll

func (p *TenantsStorage) GetAll() []*api.APITenant

GetAll .

type VNetMetaReconciler

type VNetMetaReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

VNetMetaReconciler reconciles a VNetMeta object

func (*VNetMetaReconciler) Reconcile

func (r *VNetMetaReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

Reconcile .

func (*VNetMetaReconciler) SetupWithManager

func (r *VNetMetaReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager .

type VNetReconciler

type VNetReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

VNetReconciler reconciles a VNet object

func (*VNetReconciler) Reconcile

func (r *VNetReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

Reconcile vnet events

func (*VNetReconciler) SetupWithManager

func (r *VNetReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager Resources

func (*VNetReconciler) VnetToVnetMeta

func (r *VNetReconciler) VnetToVnetMeta(vnet *k8sv1alpha1.VNet) (*k8sv1alpha1.VNetMeta, error)

VnetToVnetMeta converts the VNet resource to VNetMeta type and used for add the VNet for Netris API.

type VNetStorage

type VNetStorage struct {
	sync.Mutex
	VNets []*api.APIVNet
}

VNetStorage .

func NewVNetStorage

func NewVNetStorage() *VNetStorage

NewVNetStorage .

func (*VNetStorage) Download

func (p *VNetStorage) Download() error

Download .

func (*VNetStorage) FindByID

func (p *VNetStorage) FindByID(id int) (*api.APIVNet, bool)

FindByID .

func (*VNetStorage) FindByName

func (p *VNetStorage) FindByName(name string) (*api.APIVNet, bool)

FindByName .

func (*VNetStorage) GetAll

func (p *VNetStorage) GetAll() []*api.APIVNet

GetAll .

Jump to

Keyboard shortcuts

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