backend

package
v0.0.0-...-fda977c Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IPPOOL_RESOURCE = "ippools.v1.multinic.fms.io"
	IPPOOL_KIND     = "IPPool"
)
View Source
const (
	API_VERSION = "multinic.fms.io/v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocation

type Allocation struct {
	Pod       string `json:"pod"`
	Namespace string `json:"namespace"`
	Index     int    `json:"index"`
	Address   string `json:"address"`
}

type DynamicHandler

type DynamicHandler struct {
	DC           *discovery.DiscoveryClient
	DYN          dynamic.Interface
	ResourceName string
	Kind         string
}

func (*DynamicHandler) BasicObject

func (h *DynamicHandler) BasicObject(name string) map[string]interface{}

func (*DynamicHandler) Create

func (h *DynamicHandler) Create(mapObj map[string]interface{}, namespace string, options metav1.CreateOptions) (*unstructured.Unstructured, error)

func (*DynamicHandler) Delete

func (h *DynamicHandler) Delete(name string, namespace string, options metav1.DeleteOptions) error

func (*DynamicHandler) Get

func (h *DynamicHandler) Get(name string, namespace string, options metav1.GetOptions) (*unstructured.Unstructured, error)

func (*DynamicHandler) GetName

func (*DynamicHandler) List

func (h *DynamicHandler) List(namespace string, options metav1.ListOptions) (*unstructured.UnstructuredList, error)

func (*DynamicHandler) Parse

func (h *DynamicHandler) Parse(obj map[string]interface{}, output interface{}) interface{}

func (*DynamicHandler) Patch

func (h *DynamicHandler) Patch(name string, namespace string, pt types.PatchType, data []byte, options metav1.PatchOptions) (*unstructured.Unstructured, error)

func (*DynamicHandler) Untidy

func (h *DynamicHandler) Untidy(structObj interface{}) map[string]interface{}

func (*DynamicHandler) Update

func (h *DynamicHandler) Update(mapObj map[string]interface{}, namespace string, options metav1.UpdateOptions) (*unstructured.Unstructured, error)

type IPPoolHandler

type IPPoolHandler struct {
	*DynamicHandler
}

func NewIPPoolHandler

func NewIPPoolHandler(config *rest.Config) *IPPoolHandler

func (*IPPoolHandler) ListIPPool

func (h *IPPoolHandler) ListIPPool(listOptions metav1.ListOptions) (map[string]IPPoolType, error)

func (*IPPoolHandler) PatchIPPool

func (h *IPPoolHandler) PatchIPPool(poolname string, allocations []Allocation) (*unstructured.Unstructured, error)

type IPPoolType

type IPPoolType struct {
	PodCIDR          string       `json:"podCIDR"`
	VlanCIDR         string       `json:"vlanCIDR"`
	NetAttachDefName string       `json:"netAttachDef"`
	HostName         string       `json:"hostName"`
	InterfaceName    string       `json:"interfaceName"`
	Excludes         []string     `json'"excludes"`
	Allocations      []Allocation `json:"allocations"`
}

Jump to

Keyboard shortcuts

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