Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeYAMLFromData(data []byte, into runtime.Object) (runtime.Object, error)
- func DecodeYAMLFromFile(path string, into runtime.Object) (runtime.Object, error)
- func GetCertChain(m map[string]string) (string, error)
- func GetRootCA() (string, error)
- func InitRsyncClient() bool
- func ValidateIPRangeObject(sl validator.StructLevel)
- type BaseObjectManager
- func (c *BaseObjectManager) AddDepResManager(mgr ControllerObjectManager)
- func (c *BaseObjectManager) AddOwnResManager(mgr ControllerObjectManager)
- func (c *BaseObjectManager) GetDepResManagers() []ControllerObjectManager
- func (c *BaseObjectManager) GetOwnResManagers() []ControllerObjectManager
- func (c *BaseObjectManager) GetResourceStoredName(obj module.ControllerObject) string
- func (c *BaseObjectManager) GetStoreMeta() string
- func (c *BaseObjectManager) GetStoreName() string
- type CNFObjectKey
- type CNFObjectManager
- func (c *CNFObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *CNFObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *CNFObjectManager) DeleteObject(m map[string]string) error
- func (c *CNFObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *CNFObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *CNFObjectManager) GetResourceName() string
- func (c *CNFObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *CNFObjectManager) IsOperationSupported(oper string) bool
- func (c *CNFObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *CNFObjectManager) ParseStatus(val string) (string, error)
- func (c *CNFObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type CertUtil
- func (c *CertUtil) CreateCAIssuer(name string, namespace string, caname string) (*certv1.Issuer, error)
- func (c *CertUtil) CreateCertificate(name string, namespace string, issuer string, isCA bool) (*certv1.Certificate, error)
- func (c *CertUtil) CreateNamespace(name string) (*v1.Namespace, error)
- func (c *CertUtil) CreateSelfSignedIssuer(name string, namespace string) (*certv1.Issuer, error)
- func (c *CertUtil) DeleteCertificate(name string, namespace string) error
- func (c *CertUtil) DeleteIssuer(name string, namespace string) error
- func (c *CertUtil) DeleteNamespace(name string) error
- func (c *CertUtil) GetCertSecretName(name string) string
- func (c *CertUtil) GetCertificate(name string, namespace string) (*certv1.Certificate, error)
- func (c *CertUtil) GetIssuer(name string, namespace string) (*certv1.Issuer, error)
- func (c *CertUtil) GetKeypair(certname string, namespace string) (string, string, error)
- func (c *CertUtil) GetSelfSignedCA() string
- func (c *CertUtil) IsCertReady(name string, namespace string) bool
- type CertificateObjectKey
- type CertificateObjectManager
- func (c *CertificateObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *CertificateObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *CertificateObjectManager) DeleteCertificateByType(overlay_name string, dev_name string, dev_type string) error
- func (c *CertificateObjectManager) DeleteObject(m map[string]string) error
- func (c *CertificateObjectManager) GetCertName(name string, obj_type string) string
- func (c *CertificateObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *CertificateObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *CertificateObjectManager) GetOrCreateCertificateByType(overlay_name string, dev_name string, dev_type string, isCA bool) (string, string, string, error)
- func (c *CertificateObjectManager) GetOrCreateDC(overlay_name string, dev_name string, isCA bool) (string, string, string, error)
- func (c *CertificateObjectManager) GetResourceName() string
- func (c *CertificateObjectManager) GetResourceStoredName(obj module.ControllerObject) string
- func (c *CertificateObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *CertificateObjectManager) IsOperationSupported(oper string) bool
- func (c *CertificateObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *CertificateObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type Cluster
- type ClusterContent
- type ClusterKey
- type ClusterSyncObjectKey
- type ClusterSyncObjectManager
- func (c *ClusterSyncObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *ClusterSyncObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *ClusterSyncObjectManager) DeleteObject(m map[string]string) error
- func (c *ClusterSyncObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *ClusterSyncObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *ClusterSyncObjectManager) GetResourceName() string
- func (c *ClusterSyncObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *ClusterSyncObjectManager) IsOperationSupported(oper string) bool
- func (c *ClusterSyncObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *ClusterSyncObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type ConnectionKey
- type ConnectionManager
- func (c *ConnectionManager) CreateEmptyObject() module.ControllerObject
- func (c *ConnectionManager) DeleteObject(overlay string, key1 string, key2 string) error
- func (c *ConnectionManager) Deploy(overlay string, cm module.ConnectionObject, resutil *ResUtil) error
- func (c *ConnectionManager) GetObject(overlay string, key1 string, key2 string) (module.ControllerObject, error)
- func (c *ConnectionManager) GetObjects(overlay string, key string) ([]module.ControllerObject, error)
- func (c *ConnectionManager) GetStoreMeta() string
- func (c *ConnectionManager) GetStoreName() string
- func (c *ConnectionManager) Undeploy(overlay string, cm module.ConnectionObject) error
- func (c *ConnectionManager) UpdateObject(overlay string, cm module.ConnectionObject) (module.ControllerObject, error)
- type ControllerObjectManager
- type DBUtils
- func (d *DBUtils) CheckDep(c ControllerObjectManager, m map[string]string) error
- func (d *DBUtils) CheckOwn(c ControllerObjectManager, m map[string]string) error
- func (d *DBUtils) CreateObject(c ControllerObjectManager, m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (d *DBUtils) DeleteObject(c ControllerObjectManager, m map[string]string) error
- func (d *DBUtils) GetObject(c ControllerObjectManager, m map[string]string) (module.ControllerObject, error)
- func (d *DBUtils) GetObjects(c ControllerObjectManager, m map[string]string) ([]module.ControllerObject, error)
- func (d *DBUtils) RegisterDevice(overlay, cluster_name string, kubeconfig string) error
- func (d *DBUtils) RegisterGitOpsDevice(overlay, cluster_name string, gs mtypes.GitOpsSpec) error
- func (d *DBUtils) UnregisterDevice(overlay, cluster_name string) error
- func (d *DBUtils) UnregisterGitOpsDevice(overlay, cluster_name string) error
- func (d *DBUtils) UpdateObject(c ControllerObjectManager, m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type DeployResource
- type DeployResources
- type DeviceConnObjectKey
- type DeviceConnObjectManager
- func (c *DeviceConnObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *DeviceConnObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *DeviceConnObjectManager) DeleteObject(m map[string]string) error
- func (c *DeviceConnObjectManager) GetConnectedHubs(overlay_name string, device_name string) ([]string, error)
- func (c *DeviceConnObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *DeviceConnObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *DeviceConnObjectManager) GetResourceName() string
- func (c *DeviceConnObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *DeviceConnObjectManager) IsConnectedHub(overlay_name string, device_name string, hub string) bool
- func (c *DeviceConnObjectManager) IsOperationSupported(oper string) bool
- func (c *DeviceConnObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *DeviceConnObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type DeviceObjectKey
- type DeviceObjectManager
- func (c *DeviceObjectManager) AllocateIP(m map[string]string, t module.ControllerObject, name string) (string, error)
- func (c *DeviceObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *DeviceObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *DeviceObjectManager) DeleteObject(m map[string]string) error
- func (c *DeviceObjectManager) FreeIP(m map[string]string, t module.ControllerObject, name string) error
- func (c *DeviceObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *DeviceObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *DeviceObjectManager) GetResourceName() string
- func (c *DeviceObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *DeviceObjectManager) IsOperationSupported(oper string) bool
- func (c *DeviceObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *DeviceObjectManager) PostRegister(m map[string]string, t module.ControllerObject) error
- func (c *DeviceObjectManager) PreProcessing(m map[string]string, t module.ControllerObject) error
- func (c *DeviceObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type DeviceSiteObjectKey
- type DeviceSiteObjectManager
- func (c *DeviceSiteObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *DeviceSiteObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *DeviceSiteObjectManager) DeleteObject(m map[string]string) error
- func (c *DeviceSiteObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *DeviceSiteObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *DeviceSiteObjectManager) GetResourceName() string
- func (c *DeviceSiteObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *DeviceSiteObjectManager) IsOperationSupported(oper string) bool
- func (c *DeviceSiteObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *DeviceSiteObjectManager) TryDeleteSite(overlay string, hub string, device string) error
- func (c *DeviceSiteObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type HubConnObjectKey
- type HubConnObjectManager
- func (c *HubConnObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *HubConnObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *HubConnObjectManager) DeleteObject(m map[string]string) error
- func (c *HubConnObjectManager) GetConnectedDevices(overlay_name string, hub_name string) ([]string, error)
- func (c *HubConnObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *HubConnObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *HubConnObjectManager) GetResourceName() string
- func (c *HubConnObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *HubConnObjectManager) IsOperationSupported(oper string) bool
- func (c *HubConnObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *HubConnObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type HubDeviceObjectKey
- type HubDeviceObjectManager
- func (c *HubDeviceObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *HubDeviceObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *HubDeviceObjectManager) DeleteObject(m map[string]string) error
- func (c *HubDeviceObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *HubDeviceObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *HubDeviceObjectManager) GetResourceName() string
- func (c *HubDeviceObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *HubDeviceObjectManager) IsOperationSupported(oper string) bool
- func (c *HubDeviceObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *HubDeviceObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type HubObjectKey
- type HubObjectManager
- func (c *HubObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *HubObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *HubObjectManager) DeleteObject(m map[string]string) error
- func (c *HubObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *HubObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *HubObjectManager) GetResourceName() string
- func (c *HubObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *HubObjectManager) IsOperationSupported(oper string) bool
- func (c *HubObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *HubObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type IPRangeObjectKey
- type IPRangeObjectManager
- func (c *IPRangeObjectManager) Allocate(oname string, name string) (string, error)
- func (c *IPRangeObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *IPRangeObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *IPRangeObjectManager) DeleteObject(m map[string]string) error
- func (c *IPRangeObjectManager) Free(oname string, ip string) error
- func (c *IPRangeObjectManager) FreeAll(oname string) error
- func (c *IPRangeObjectManager) GetDefinedObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *IPRangeObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *IPRangeObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *IPRangeObjectManager) GetResourceName() string
- func (c *IPRangeObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *IPRangeObjectManager) IsOperationSupported(oper string) bool
- func (c *IPRangeObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *IPRangeObjectManager) SetIPRangeName(k db.Key, name string)
- func (c *IPRangeObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type KubeConfigUtil
- type Managerset
- type OverlayObjectKey
- type OverlayObjectManager
- func (c *OverlayObjectManager) CertName(name string) string
- func (c *OverlayObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *OverlayObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *OverlayObjectManager) DeleteConnection(m map[string]string, conn module.ConnectionObject) error
- func (c *OverlayObjectManager) DeleteConnections(m map[string]string, m1 module.ControllerObject) error
- func (c *OverlayObjectManager) DeleteObject(m map[string]string) error
- func (c *OverlayObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *OverlayObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *OverlayObjectManager) GetResourceName() string
- func (c *OverlayObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *OverlayObjectManager) IsOperationSupported(oper string) bool
- func (c *OverlayObjectManager) IssuerName(name string) string
- func (c *OverlayObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *OverlayObjectManager) SetupConnection(m map[string]string, m1 module.ControllerObject, m2 module.ControllerObject, ...) error
- func (c *OverlayObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type ProposalObjectKey
- type ProposalObjectManager
- func (c *ProposalObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *ProposalObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *ProposalObjectManager) DeleteObject(m map[string]string) error
- func (c *ProposalObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *ProposalObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *ProposalObjectManager) GetResourceName() string
- func (c *ProposalObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *ProposalObjectManager) IsOperationSupported(oper string) bool
- func (c *ProposalObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *ProposalObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- type ProviderIPRangeObjectKey
- type QueryResource
- type QueryResources
- type ReadResource
- type ResUtil
- func (d *ResUtil) AddQueryResource(device module.ControllerObject, resource QueryResource) error
- func (d *ResUtil) AddResource(device module.ControllerObject, action string, ...) error
- func (d *ResUtil) Deploy(overlay string, app_name string, format string) error
- func (d *ResUtil) DeployOneResource(overlay, app_name string, format string, device module.ControllerObject, ...) (string, error)
- func (d *ResUtil) DeployUpdate(overlay string, app_name string, format string, update bool) error
- func (d *ResUtil) GetResourceData(device module.ControllerObject, ns string, name string) (string, error)
- func (d *ResUtil) GetResources() map[module.ControllerObject]*DeployResources
- func (d *ResUtil) Query(app_name string) (string, error)
- func (d *ResUtil) TargetName(o module.ControllerObject) string
- func (d *ResUtil) Undeploy(overlay string) error
- func (d *ResUtil) UpdateOneResource(overlay, cid string, device module.ControllerObject, resourceName string, ...) error
- type ResourceObjectKey
- type ResourceObjectManager
- func (c *ResourceObjectManager) CreateEmptyObject() module.ControllerObject
- func (c *ResourceObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
- func (c *ResourceObjectManager) DeleteObject(m map[string]string) error
- func (c *ResourceObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
- func (c *ResourceObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
- func (c *ResourceObjectManager) GetResourceName() string
- func (c *ResourceObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
- func (c *ResourceObjectManager) IsOperationSupported(oper string) bool
- func (c *ResourceObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
- func (c *ResourceObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
Constants ¶
const ( OverlayKey = "Overlay" DeviceKey = "Device" HubKey = "Hub" InternalKey = "internal" )
const ( NameSpaceName = "sdewan-system" RootIssuerName = "sdewan-controller" RootCAIssuerName = "sdewan-controller-ca" RootCertName = "sdewan-controller" SCCCertName = "sdewan-controller-base" StoreName = "centralcontroller" OverlayCollection = "overlays" OverlayResource = "overlay-name" ProposalCollection = "proposals" ProposalResource = "proposal-name" HubCollection = "hubs" HubResource = "hub-name" ConnectionCollection = "connections" ConnectionResource = "connection-name" CNFCollection = "cnfs" CNFResource = "cnf-name" DeviceCollection = "devices" DeviceResource = "device-name" IPRangeCollection = "ipranges" IPRangeResource = "iprange-name" CertCollection = "certificates" CertResource = "certificate-name" ClusterSyncCollection = "cluster-sync-objects" ClusterSyncResource = "cluster-sync-object-name" SiteCollection = "sites" SiteResource = "site-name" Resource = "resource" Resource_Status_NotDeployed = "NotDeployed" Resource_Status_Deployed = "Deployed" )
const ( DEFAULT_MARK = "30" VTI_MODE = "VTI-based" POLICY_MODE = "policy-based" PUBKEY_AUTH = "pubkey" FORCECRYPTOPROPOSAL = "0" DEFAULT_CONN = "Conn" DEFAULT_UPDOWN = "/etc/updown" IPTABLES_UPDOWN = "/usr/lib/ipsec/_updown iptables" OIP_UPDOWN = "/etc/updown_oip" CONN_TYPE = "tunnel" START_MODE = "start" ADD_MODE = "add" OVERLAYIP = "overlayip" HUBTOHUB = "hub-to-hub" HUBTODEVICE = "hub-to-device" DEVICETODEVICE = "device-to-device" BYCONFIG = "%config" ANY = "%any" BASE_PROTOCOL = "TCP" DEFAULT_K8S_API_SERVER_PORT = "6443" ACCEPT = "ACCEPT" WILDCARD_SUBNET = "0.0.0.0" )
const DEFAULTPORT = "6443"
const PROVIDERNAME = "akraino_scc"
const RegStatus = "RegStatus"
const SCC_RESOURCE = "scc_ipsec_resource"
const SELFSIGNEDCA = "sdewan-controller"
Variables ¶
var Resource_mux = sync.Mutex{}
Functions ¶
func DecodeYAMLFromData ¶
func DecodeYAMLFromFile ¶
func InitRsyncClient ¶
func InitRsyncClient() bool
func ValidateIPRangeObject ¶
func ValidateIPRangeObject(sl validator.StructLevel)
Types ¶
type BaseObjectManager ¶
type BaseObjectManager struct {
// contains filtered or unexported fields
}
func (*BaseObjectManager) AddDepResManager ¶
func (c *BaseObjectManager) AddDepResManager(mgr ControllerObjectManager)
func (*BaseObjectManager) AddOwnResManager ¶
func (c *BaseObjectManager) AddOwnResManager(mgr ControllerObjectManager)
func (*BaseObjectManager) GetDepResManagers ¶
func (c *BaseObjectManager) GetDepResManagers() []ControllerObjectManager
func (*BaseObjectManager) GetOwnResManagers ¶
func (c *BaseObjectManager) GetOwnResManagers() []ControllerObjectManager
func (*BaseObjectManager) GetResourceStoredName ¶
func (c *BaseObjectManager) GetResourceStoredName(obj module.ControllerObject) string
func (*BaseObjectManager) GetStoreMeta ¶
func (c *BaseObjectManager) GetStoreMeta() string
func (*BaseObjectManager) GetStoreName ¶
func (c *BaseObjectManager) GetStoreName() string
type CNFObjectKey ¶
type CNFObjectManager ¶
type CNFObjectManager struct { BaseObjectManager // contains filtered or unexported fields }
CNFObjectManager implements the ControllerObjectManager
func NewCNFObjectManager ¶
func NewCNFObjectManager(isHub bool) *CNFObjectManager
func (*CNFObjectManager) CreateEmptyObject ¶
func (c *CNFObjectManager) CreateEmptyObject() module.ControllerObject
func (*CNFObjectManager) CreateObject ¶
func (c *CNFObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*CNFObjectManager) DeleteObject ¶
func (c *CNFObjectManager) DeleteObject(m map[string]string) error
func (*CNFObjectManager) GetObject ¶
func (c *CNFObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*CNFObjectManager) GetObjects ¶
func (c *CNFObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*CNFObjectManager) GetResourceName ¶
func (c *CNFObjectManager) GetResourceName() string
func (*CNFObjectManager) GetStoreKey ¶
func (c *CNFObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*CNFObjectManager) IsOperationSupported ¶
func (c *CNFObjectManager) IsOperationSupported(oper string) bool
func (*CNFObjectManager) ParseObject ¶
func (c *CNFObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*CNFObjectManager) ParseStatus ¶
func (c *CNFObjectManager) ParseStatus(val string) (string, error)
func (*CNFObjectManager) UpdateObject ¶
func (c *CNFObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type CertUtil ¶
type CertUtil struct {
// contains filtered or unexported fields
}
func GetCertUtil ¶
func (*CertUtil) CreateCAIssuer ¶
func (*CertUtil) CreateCertificate ¶
func (*CertUtil) CreateNamespace ¶
func (*CertUtil) CreateSelfSignedIssuer ¶
func (*CertUtil) DeleteCertificate ¶
func (*CertUtil) DeleteIssuer ¶
func (*CertUtil) DeleteNamespace ¶
func (*CertUtil) GetCertSecretName ¶
func (*CertUtil) GetCertificate ¶
func (*CertUtil) GetKeypair ¶
func (*CertUtil) GetSelfSignedCA ¶
type CertificateObjectKey ¶
type CertificateObjectManager ¶
type CertificateObjectManager struct {
BaseObjectManager
}
IPRangeObjectManager implements the ControllerObjectManager
func NewCertificateObjectManager ¶
func NewCertificateObjectManager() *CertificateObjectManager
func (*CertificateObjectManager) CreateEmptyObject ¶
func (c *CertificateObjectManager) CreateEmptyObject() module.ControllerObject
func (*CertificateObjectManager) CreateObject ¶
func (c *CertificateObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*CertificateObjectManager) DeleteCertificateByType ¶
func (c *CertificateObjectManager) DeleteCertificateByType(overlay_name string, dev_name string, dev_type string) error
func (*CertificateObjectManager) DeleteObject ¶
func (c *CertificateObjectManager) DeleteObject(m map[string]string) error
func (*CertificateObjectManager) GetCertName ¶
func (c *CertificateObjectManager) GetCertName(name string, obj_type string) string
func (*CertificateObjectManager) GetObject ¶
func (c *CertificateObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*CertificateObjectManager) GetObjects ¶
func (c *CertificateObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*CertificateObjectManager) GetOrCreateCertificateByType ¶
func (*CertificateObjectManager) GetOrCreateDC ¶
func (*CertificateObjectManager) GetResourceName ¶
func (c *CertificateObjectManager) GetResourceName() string
func (*CertificateObjectManager) GetResourceStoredName ¶
func (c *CertificateObjectManager) GetResourceStoredName(obj module.ControllerObject) string
func (*CertificateObjectManager) GetStoreKey ¶
func (c *CertificateObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*CertificateObjectManager) IsOperationSupported ¶
func (c *CertificateObjectManager) IsOperationSupported(oper string) bool
func (*CertificateObjectManager) ParseObject ¶
func (c *CertificateObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*CertificateObjectManager) UpdateObject ¶
func (c *CertificateObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type ClusterContent ¶
type ClusterContent struct {
Kubeconfig string `json:"kubeconfig"`
}
type ClusterKey ¶
type ClusterSyncObjectKey ¶
type ClusterSyncObjectManager ¶
type ClusterSyncObjectManager struct {
BaseObjectManager
}
ClusterSyncObjectManager implements the ControllerObjectManager
func NewClusterSyncObjectManager ¶
func NewClusterSyncObjectManager() *ClusterSyncObjectManager
func (*ClusterSyncObjectManager) CreateEmptyObject ¶
func (c *ClusterSyncObjectManager) CreateEmptyObject() module.ControllerObject
func (*ClusterSyncObjectManager) CreateObject ¶
func (c *ClusterSyncObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*ClusterSyncObjectManager) DeleteObject ¶
func (c *ClusterSyncObjectManager) DeleteObject(m map[string]string) error
func (*ClusterSyncObjectManager) GetObject ¶
func (c *ClusterSyncObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*ClusterSyncObjectManager) GetObjects ¶
func (c *ClusterSyncObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*ClusterSyncObjectManager) GetResourceName ¶
func (c *ClusterSyncObjectManager) GetResourceName() string
func (*ClusterSyncObjectManager) GetStoreKey ¶
func (c *ClusterSyncObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*ClusterSyncObjectManager) IsOperationSupported ¶
func (c *ClusterSyncObjectManager) IsOperationSupported(oper string) bool
func (*ClusterSyncObjectManager) ParseObject ¶
func (c *ClusterSyncObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*ClusterSyncObjectManager) UpdateObject ¶
func (c *ClusterSyncObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type ConnectionKey ¶
type ConnectionManager ¶
type ConnectionManager struct {
// contains filtered or unexported fields
}
func GetConnectionManager ¶
func GetConnectionManager() *ConnectionManager
func (*ConnectionManager) CreateEmptyObject ¶
func (c *ConnectionManager) CreateEmptyObject() module.ControllerObject
func (*ConnectionManager) DeleteObject ¶
func (c *ConnectionManager) DeleteObject(overlay string, key1 string, key2 string) error
func (*ConnectionManager) Deploy ¶
func (c *ConnectionManager) Deploy(overlay string, cm module.ConnectionObject, resutil *ResUtil) error
func (*ConnectionManager) GetObject ¶
func (c *ConnectionManager) GetObject(overlay string, key1 string, key2 string) (module.ControllerObject, error)
func (*ConnectionManager) GetObjects ¶
func (c *ConnectionManager) GetObjects(overlay string, key string) ([]module.ControllerObject, error)
func (*ConnectionManager) GetStoreMeta ¶
func (c *ConnectionManager) GetStoreMeta() string
func (*ConnectionManager) GetStoreName ¶
func (c *ConnectionManager) GetStoreName() string
func (*ConnectionManager) Undeploy ¶
func (c *ConnectionManager) Undeploy(overlay string, cm module.ConnectionObject) error
func (*ConnectionManager) UpdateObject ¶
func (c *ConnectionManager) UpdateObject(overlay string, cm module.ConnectionObject) (module.ControllerObject, error)
type ControllerObjectManager ¶
type ControllerObjectManager interface { GetStoreName() string GetStoreMeta() string GetDepResManagers() []ControllerObjectManager AddDepResManager(mgr ControllerObjectManager) GetOwnResManagers() []ControllerObjectManager AddOwnResManager(mgr ControllerObjectManager) GetResourceName() string GetResourceStoredName(obj module.ControllerObject) string IsOperationSupported(oper string) bool GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error) CreateEmptyObject() module.ControllerObject ParseObject(r io.Reader) (module.ControllerObject, error) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error) GetObject(m map[string]string) (module.ControllerObject, error) GetObjects(m map[string]string) ([]module.ControllerObject, error) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error) DeleteObject(m map[string]string) error }
ControllerManager is an interface exposes the ControllerObject functionality
type DBUtils ¶
type DBUtils struct { }
func GetDBUtils ¶
func GetDBUtils() *DBUtils
func (*DBUtils) CheckDep ¶
func (d *DBUtils) CheckDep(c ControllerObjectManager, m map[string]string) error
func (*DBUtils) CheckOwn ¶
func (d *DBUtils) CheckOwn(c ControllerObjectManager, m map[string]string) error
func (*DBUtils) CreateObject ¶
func (d *DBUtils) CreateObject(c ControllerObjectManager, m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*DBUtils) DeleteObject ¶
func (d *DBUtils) DeleteObject(c ControllerObjectManager, m map[string]string) error
func (*DBUtils) GetObject ¶
func (d *DBUtils) GetObject(c ControllerObjectManager, m map[string]string) (module.ControllerObject, error)
func (*DBUtils) GetObjects ¶
func (d *DBUtils) GetObjects(c ControllerObjectManager, m map[string]string) ([]module.ControllerObject, error)
func (*DBUtils) RegisterDevice ¶
func (*DBUtils) RegisterGitOpsDevice ¶
func (d *DBUtils) RegisterGitOpsDevice(overlay, cluster_name string, gs mtypes.GitOpsSpec) error
func (*DBUtils) UnregisterDevice ¶
func (*DBUtils) UnregisterGitOpsDevice ¶
func (*DBUtils) UpdateObject ¶
func (d *DBUtils) UpdateObject(c ControllerObjectManager, m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type DeployResource ¶
type DeployResource struct { Action string Resource resource.ISdewanResource Status int // 0: to be (un)deployed; 1: success; 2: failed }
sdewan definition
type DeployResources ¶
type DeployResources struct {
Resources []DeployResource
}
type DeviceConnObjectKey ¶
type DeviceConnObjectManager ¶
type DeviceConnObjectManager struct {
BaseObjectManager
}
DeviceConnObjectManager implements the ControllerObjectManager
func NewDeviceConnObjectManager ¶
func NewDeviceConnObjectManager() *DeviceConnObjectManager
func (*DeviceConnObjectManager) CreateEmptyObject ¶
func (c *DeviceConnObjectManager) CreateEmptyObject() module.ControllerObject
func (*DeviceConnObjectManager) CreateObject ¶
func (c *DeviceConnObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*DeviceConnObjectManager) DeleteObject ¶
func (c *DeviceConnObjectManager) DeleteObject(m map[string]string) error
func (*DeviceConnObjectManager) GetConnectedHubs ¶
func (c *DeviceConnObjectManager) GetConnectedHubs(overlay_name string, device_name string) ([]string, error)
func (*DeviceConnObjectManager) GetObject ¶
func (c *DeviceConnObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*DeviceConnObjectManager) GetObjects ¶
func (c *DeviceConnObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*DeviceConnObjectManager) GetResourceName ¶
func (c *DeviceConnObjectManager) GetResourceName() string
func (*DeviceConnObjectManager) GetStoreKey ¶
func (c *DeviceConnObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*DeviceConnObjectManager) IsConnectedHub ¶
func (c *DeviceConnObjectManager) IsConnectedHub(overlay_name string, device_name string, hub string) bool
func (*DeviceConnObjectManager) IsOperationSupported ¶
func (c *DeviceConnObjectManager) IsOperationSupported(oper string) bool
func (*DeviceConnObjectManager) ParseObject ¶
func (c *DeviceConnObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*DeviceConnObjectManager) UpdateObject ¶
func (c *DeviceConnObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type DeviceObjectKey ¶
type DeviceObjectManager ¶
type DeviceObjectManager struct {
BaseObjectManager
}
DeviceObjectManager implements the ControllerObjectManager
func NewDeviceObjectManager ¶
func NewDeviceObjectManager() *DeviceObjectManager
func (*DeviceObjectManager) AllocateIP ¶
func (c *DeviceObjectManager) AllocateIP(m map[string]string, t module.ControllerObject, name string) (string, error)
Function allocate ip and update
func (*DeviceObjectManager) CreateEmptyObject ¶
func (c *DeviceObjectManager) CreateEmptyObject() module.ControllerObject
func (*DeviceObjectManager) CreateObject ¶
func (c *DeviceObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*DeviceObjectManager) DeleteObject ¶
func (c *DeviceObjectManager) DeleteObject(m map[string]string) error
func (*DeviceObjectManager) FreeIP ¶
func (c *DeviceObjectManager) FreeIP(m map[string]string, t module.ControllerObject, name string) error
Function free ip and update
func (*DeviceObjectManager) GetObject ¶
func (c *DeviceObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*DeviceObjectManager) GetObjects ¶
func (c *DeviceObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*DeviceObjectManager) GetResourceName ¶
func (c *DeviceObjectManager) GetResourceName() string
func (*DeviceObjectManager) GetStoreKey ¶
func (c *DeviceObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*DeviceObjectManager) IsOperationSupported ¶
func (c *DeviceObjectManager) IsOperationSupported(oper string) bool
func (*DeviceObjectManager) ParseObject ¶
func (c *DeviceObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*DeviceObjectManager) PostRegister ¶
func (c *DeviceObjectManager) PostRegister(m map[string]string, t module.ControllerObject) error
func (*DeviceObjectManager) PreProcessing ¶
func (c *DeviceObjectManager) PreProcessing(m map[string]string, t module.ControllerObject) error
func (*DeviceObjectManager) UpdateObject ¶
func (c *DeviceObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type DeviceSiteObjectKey ¶
type DeviceSiteObjectManager ¶
type DeviceSiteObjectManager struct {
BaseObjectManager
}
DeviceSiteObjectManager implements the ControllerObjectManager
func NewDeviceSiteObjectManager ¶
func NewDeviceSiteObjectManager() *DeviceSiteObjectManager
func (*DeviceSiteObjectManager) CreateEmptyObject ¶
func (c *DeviceSiteObjectManager) CreateEmptyObject() module.ControllerObject
func (*DeviceSiteObjectManager) CreateObject ¶
func (c *DeviceSiteObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*DeviceSiteObjectManager) DeleteObject ¶
func (c *DeviceSiteObjectManager) DeleteObject(m map[string]string) error
func (*DeviceSiteObjectManager) GetObject ¶
func (c *DeviceSiteObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*DeviceSiteObjectManager) GetObjects ¶
func (c *DeviceSiteObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*DeviceSiteObjectManager) GetResourceName ¶
func (c *DeviceSiteObjectManager) GetResourceName() string
func (*DeviceSiteObjectManager) GetStoreKey ¶
func (c *DeviceSiteObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*DeviceSiteObjectManager) IsOperationSupported ¶
func (c *DeviceSiteObjectManager) IsOperationSupported(oper string) bool
func (*DeviceSiteObjectManager) ParseObject ¶
func (c *DeviceSiteObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*DeviceSiteObjectManager) TryDeleteSite ¶
func (c *DeviceSiteObjectManager) TryDeleteSite(overlay string, hub string, device string) error
func (*DeviceSiteObjectManager) UpdateObject ¶
func (c *DeviceSiteObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type HubConnObjectKey ¶
type HubConnObjectManager ¶
type HubConnObjectManager struct {
BaseObjectManager
}
HubConnObjectManager implements the ControllerObjectManager
func NewHubConnObjectManager ¶
func NewHubConnObjectManager() *HubConnObjectManager
func (*HubConnObjectManager) CreateEmptyObject ¶
func (c *HubConnObjectManager) CreateEmptyObject() module.ControllerObject
func (*HubConnObjectManager) CreateObject ¶
func (c *HubConnObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*HubConnObjectManager) DeleteObject ¶
func (c *HubConnObjectManager) DeleteObject(m map[string]string) error
func (*HubConnObjectManager) GetConnectedDevices ¶
func (c *HubConnObjectManager) GetConnectedDevices(overlay_name string, hub_name string) ([]string, error)
func (*HubConnObjectManager) GetObject ¶
func (c *HubConnObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*HubConnObjectManager) GetObjects ¶
func (c *HubConnObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*HubConnObjectManager) GetResourceName ¶
func (c *HubConnObjectManager) GetResourceName() string
func (*HubConnObjectManager) GetStoreKey ¶
func (c *HubConnObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*HubConnObjectManager) IsOperationSupported ¶
func (c *HubConnObjectManager) IsOperationSupported(oper string) bool
func (*HubConnObjectManager) ParseObject ¶
func (c *HubConnObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*HubConnObjectManager) UpdateObject ¶
func (c *HubConnObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type HubDeviceObjectKey ¶
type HubDeviceObjectManager ¶
type HubDeviceObjectManager struct {
BaseObjectManager
}
HubDeviceObjectManager implements the ControllerObjectManager
func NewHubDeviceObjectManager ¶
func NewHubDeviceObjectManager() *HubDeviceObjectManager
func (*HubDeviceObjectManager) CreateEmptyObject ¶
func (c *HubDeviceObjectManager) CreateEmptyObject() module.ControllerObject
func (*HubDeviceObjectManager) CreateObject ¶
func (c *HubDeviceObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*HubDeviceObjectManager) DeleteObject ¶
func (c *HubDeviceObjectManager) DeleteObject(m map[string]string) error
func (*HubDeviceObjectManager) GetObject ¶
func (c *HubDeviceObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*HubDeviceObjectManager) GetObjects ¶
func (c *HubDeviceObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*HubDeviceObjectManager) GetResourceName ¶
func (c *HubDeviceObjectManager) GetResourceName() string
func (*HubDeviceObjectManager) GetStoreKey ¶
func (c *HubDeviceObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*HubDeviceObjectManager) IsOperationSupported ¶
func (c *HubDeviceObjectManager) IsOperationSupported(oper string) bool
func (*HubDeviceObjectManager) ParseObject ¶
func (c *HubDeviceObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*HubDeviceObjectManager) UpdateObject ¶
func (c *HubDeviceObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type HubObjectKey ¶
type HubObjectManager ¶
type HubObjectManager struct {
BaseObjectManager
}
HubObjectManager implements the ControllerObjectManager
func NewHubObjectManager ¶
func NewHubObjectManager() *HubObjectManager
func (*HubObjectManager) CreateEmptyObject ¶
func (c *HubObjectManager) CreateEmptyObject() module.ControllerObject
func (*HubObjectManager) CreateObject ¶
func (c *HubObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*HubObjectManager) DeleteObject ¶
func (c *HubObjectManager) DeleteObject(m map[string]string) error
func (*HubObjectManager) GetObject ¶
func (c *HubObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*HubObjectManager) GetObjects ¶
func (c *HubObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*HubObjectManager) GetResourceName ¶
func (c *HubObjectManager) GetResourceName() string
func (*HubObjectManager) GetStoreKey ¶
func (c *HubObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*HubObjectManager) IsOperationSupported ¶
func (c *HubObjectManager) IsOperationSupported(oper string) bool
func (*HubObjectManager) ParseObject ¶
func (c *HubObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*HubObjectManager) UpdateObject ¶
func (c *HubObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type IPRangeObjectKey ¶
type IPRangeObjectManager ¶
type IPRangeObjectManager struct { BaseObjectManager // contains filtered or unexported fields }
IPRangeObjectManager implements the ControllerObjectManager
func NewIPRangeObjectManager ¶
func NewIPRangeObjectManager(provider bool) *IPRangeObjectManager
func (*IPRangeObjectManager) Allocate ¶
func (c *IPRangeObjectManager) Allocate(oname string, name string) (string, error)
func (*IPRangeObjectManager) CreateEmptyObject ¶
func (c *IPRangeObjectManager) CreateEmptyObject() module.ControllerObject
func (*IPRangeObjectManager) CreateObject ¶
func (c *IPRangeObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*IPRangeObjectManager) DeleteObject ¶
func (c *IPRangeObjectManager) DeleteObject(m map[string]string) error
func (*IPRangeObjectManager) Free ¶
func (c *IPRangeObjectManager) Free(oname string, ip string) error
func (*IPRangeObjectManager) FreeAll ¶
func (c *IPRangeObjectManager) FreeAll(oname string) error
func (*IPRangeObjectManager) GetDefinedObjects ¶
func (c *IPRangeObjectManager) GetDefinedObjects(m map[string]string) ([]module.ControllerObject, error)
func (*IPRangeObjectManager) GetObject ¶
func (c *IPRangeObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*IPRangeObjectManager) GetObjects ¶
func (c *IPRangeObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*IPRangeObjectManager) GetResourceName ¶
func (c *IPRangeObjectManager) GetResourceName() string
func (*IPRangeObjectManager) GetStoreKey ¶
func (c *IPRangeObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*IPRangeObjectManager) IsOperationSupported ¶
func (c *IPRangeObjectManager) IsOperationSupported(oper string) bool
func (*IPRangeObjectManager) ParseObject ¶
func (c *IPRangeObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*IPRangeObjectManager) SetIPRangeName ¶
func (c *IPRangeObjectManager) SetIPRangeName(k db.Key, name string)
func (*IPRangeObjectManager) UpdateObject ¶
func (c *IPRangeObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type KubeConfigUtil ¶
type KubeConfigUtil struct { }
func GetKubeConfigUtil ¶
func GetKubeConfigUtil() *KubeConfigUtil
func (*KubeConfigUtil) UpdateK8sConfig ¶
type Managerset ¶
type Managerset struct { Overlay *OverlayObjectManager Proposal *ProposalObjectManager Hub *HubObjectManager HubConn *HubConnObjectManager HubDevice *HubDeviceObjectManager HubCNF *CNFObjectManager Device *DeviceObjectManager DeviceConn *DeviceConnObjectManager DeviceCNF *CNFObjectManager ProviderIPRange *IPRangeObjectManager IPRange *IPRangeObjectManager Cert *CertificateObjectManager ClusterSync *ClusterSyncObjectManager Resource *ResourceObjectManager DeviceSite *DeviceSiteObjectManager }
func GetManagerset ¶
func GetManagerset() *Managerset
type OverlayObjectKey ¶
type OverlayObjectKey struct {
OverlayName string `json:"overlay-name"`
}
type OverlayObjectManager ¶
type OverlayObjectManager struct {
BaseObjectManager
}
OverlayObjectManager implements the ControllerObjectManager
func NewOverlayObjectManager ¶
func NewOverlayObjectManager() *OverlayObjectManager
func (*OverlayObjectManager) CertName ¶
func (c *OverlayObjectManager) CertName(name string) string
func (*OverlayObjectManager) CreateEmptyObject ¶
func (c *OverlayObjectManager) CreateEmptyObject() module.ControllerObject
func (*OverlayObjectManager) CreateObject ¶
func (c *OverlayObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*OverlayObjectManager) DeleteConnection ¶
func (c *OverlayObjectManager) DeleteConnection(m map[string]string, conn module.ConnectionObject) error
func (*OverlayObjectManager) DeleteConnections ¶
func (c *OverlayObjectManager) DeleteConnections(m map[string]string, m1 module.ControllerObject) error
func (*OverlayObjectManager) DeleteObject ¶
func (c *OverlayObjectManager) DeleteObject(m map[string]string) error
func (*OverlayObjectManager) GetObject ¶
func (c *OverlayObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*OverlayObjectManager) GetObjects ¶
func (c *OverlayObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*OverlayObjectManager) GetResourceName ¶
func (c *OverlayObjectManager) GetResourceName() string
func (*OverlayObjectManager) GetStoreKey ¶
func (c *OverlayObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*OverlayObjectManager) IsOperationSupported ¶
func (c *OverlayObjectManager) IsOperationSupported(oper string) bool
func (*OverlayObjectManager) IssuerName ¶
func (c *OverlayObjectManager) IssuerName(name string) string
func (*OverlayObjectManager) ParseObject ¶
func (c *OverlayObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*OverlayObjectManager) SetupConnection ¶
func (c *OverlayObjectManager) SetupConnection(m map[string]string, m1 module.ControllerObject, m2 module.ControllerObject, conntype string, namespace string, is_delegated bool) error
Set up Connection between objects Passing the original map resource, the two objects, connection type("hub-to-hub", "hub-to-device", "device-to-device") and namespace name.
func (*OverlayObjectManager) UpdateObject ¶
func (c *OverlayObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type ProposalObjectKey ¶
type ProposalObjectManager ¶
type ProposalObjectManager struct {
BaseObjectManager
}
ProposalObjectManager implements the ControllerObjectManager
func NewProposalObjectManager ¶
func NewProposalObjectManager() *ProposalObjectManager
func (*ProposalObjectManager) CreateEmptyObject ¶
func (c *ProposalObjectManager) CreateEmptyObject() module.ControllerObject
func (*ProposalObjectManager) CreateObject ¶
func (c *ProposalObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*ProposalObjectManager) DeleteObject ¶
func (c *ProposalObjectManager) DeleteObject(m map[string]string) error
func (*ProposalObjectManager) GetObject ¶
func (c *ProposalObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*ProposalObjectManager) GetObjects ¶
func (c *ProposalObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*ProposalObjectManager) GetResourceName ¶
func (c *ProposalObjectManager) GetResourceName() string
func (*ProposalObjectManager) GetStoreKey ¶
func (c *ProposalObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*ProposalObjectManager) IsOperationSupported ¶
func (c *ProposalObjectManager) IsOperationSupported(oper string) bool
func (*ProposalObjectManager) ParseObject ¶
func (c *ProposalObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*ProposalObjectManager) UpdateObject ¶
func (c *ProposalObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
type ProviderIPRangeObjectKey ¶
type ProviderIPRangeObjectKey struct {
IPRangeName string `json:"iprange-name"`
}
type QueryResource ¶
type QueryResource struct { Handle interface{} Resource ReadResource }
type QueryResources ¶
type QueryResources struct {
Resources []*QueryResource
}
type ReadResource ¶
type ReadResource struct { Gvk schema.GroupVersionKind `json:"GVK,omitempty"` Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` }
type ResUtil ¶
type ResUtil struct {
// contains filtered or unexported fields
}
func NewResUtil ¶
func NewResUtil() *ResUtil
func (*ResUtil) AddQueryResource ¶
func (d *ResUtil) AddQueryResource(device module.ControllerObject, resource QueryResource) error
func (*ResUtil) AddResource ¶
func (d *ResUtil) AddResource(device module.ControllerObject, action string, resource resource.ISdewanResource) error
func (*ResUtil) DeployOneResource ¶
func (d *ResUtil) DeployOneResource(overlay, app_name string, format string, device module.ControllerObject, resource DeployResource) (string, error)
func (*ResUtil) DeployUpdate ¶
func (*ResUtil) GetResourceData ¶
func (*ResUtil) GetResources ¶
func (d *ResUtil) GetResources() map[module.ControllerObject]*DeployResources
func (*ResUtil) TargetName ¶
func (d *ResUtil) TargetName(o module.ControllerObject) string
func (*ResUtil) UpdateOneResource ¶
type ResourceObjectKey ¶
type ResourceObjectManager ¶
type ResourceObjectManager struct {
BaseObjectManager
}
ResourceObjectManager implements the ControllerObjectManager
func NewResourceObjectManager ¶
func NewResourceObjectManager() *ResourceObjectManager
func (*ResourceObjectManager) CreateEmptyObject ¶
func (c *ResourceObjectManager) CreateEmptyObject() module.ControllerObject
func (*ResourceObjectManager) CreateObject ¶
func (c *ResourceObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
func (*ResourceObjectManager) DeleteObject ¶
func (c *ResourceObjectManager) DeleteObject(m map[string]string) error
func (*ResourceObjectManager) GetObject ¶
func (c *ResourceObjectManager) GetObject(m map[string]string) (module.ControllerObject, error)
func (*ResourceObjectManager) GetObjects ¶
func (c *ResourceObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error)
func (*ResourceObjectManager) GetResourceName ¶
func (c *ResourceObjectManager) GetResourceName() string
func (*ResourceObjectManager) GetStoreKey ¶
func (c *ResourceObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error)
func (*ResourceObjectManager) IsOperationSupported ¶
func (c *ResourceObjectManager) IsOperationSupported(oper string) bool
func (*ResourceObjectManager) ParseObject ¶
func (c *ResourceObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error)
func (*ResourceObjectManager) UpdateObject ¶
func (c *ResourceObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error)
Source Files ¶
- certificate_objectmanager.go
- certutil.go
- clustersync_objectmanager.go
- cnf_objectmanager.go
- connection_manager.go
- constants.go
- controller_objectmanager.go
- dbutils.go
- device_objectmanager.go
- deviceconnection_objectmanager.go
- devicesite_objectmanager.go
- hub_objectmanager.go
- hubconnection_objectmanager.go
- hubdevice_objectmanager.go
- iprange_objectmanager.go
- kubeconfigutil.go
- managerset.go
- overlay_objectmanager.go
- proposal_objectmanager.go
- resource_objectmanager.go
- resutils.go
- utils.go