Documentation ¶
Index ¶
- type AgentCache
- func (ac *AgentCache) GetAgentsAddress(role string, mustStatusFlag entities.AgentStatusFlag) []string
- func (ac *AgentCache) GetETCDCount() int
- func (ac *AgentCache) GetFirstProvisionedKubernetesMasterAgent() *entities.LightningMonkeyAgent
- func (ac *AgentCache) GetKubernetesMasterCount() int
- func (ac *AgentCache) GetKubernetesMinionCount() int
- func (ac *AgentCache) GetTotalCountByRole(role string) int
- func (ac *AgentCache) GetTotalProvisionedCountByRole(role string) int
- func (ac *AgentCache) Initialize()
- func (ac *AgentCache) InitializeWithValues(etcd, k8sMaster, k8sMinion map[string]*entities.LightningMonkeyAgent)
- func (ac *AgentCache) Offline(agent entities.LightningMonkeyAgent)
- func (ac *AgentCache) Online(agent entities.LightningMonkeyAgent)
- type ClusterController
- type ClusterControllerImple
- func (cc *ClusterControllerImple) Dispose()
- func (cc *ClusterControllerImple) GetCachedAgent(agentId string) (*entities.LightningMonkeyAgent, error)
- func (cc *ClusterControllerImple) GetCertificates() entities.LightningMonkeyCertificateCollection
- func (cc *ClusterControllerImple) GetClusterId() string
- func (cc *ClusterControllerImple) GetDNSController() controllers.DNSDeploymentController
- func (cc *ClusterControllerImple) GetNetworkController() controllers.NetworkStackController
- func (cc *ClusterControllerImple) GetNextJob(agent entities.LightningMonkeyAgent) (entities.AgentJob, error)
- func (cc *ClusterControllerImple) GetSettings() entities.LightningMonkeyClusterSettings
- func (cc *ClusterControllerImple) GetStatus() string
- func (cc *ClusterControllerImple) GetSynchronizedRevision() int64
- func (cc *ClusterControllerImple) GetTotalCountByRole(role string) int
- func (cc *ClusterControllerImple) GetTotalProvisionedCountByRole(role string) int
- func (cc *ClusterControllerImple) Initialize(sd storage.LightningMonkeyStorageDriver)
- func (cc *ClusterControllerImple) InitializeDNSController() error
- func (cc *ClusterControllerImple) InitializeKubernetesClient() error
- func (cc *ClusterControllerImple) InitializeNetworkController() error
- func (cc *ClusterControllerImple) Lock()
- func (cc *ClusterControllerImple) OnAgentChanged(agent entities.LightningMonkeyAgent, isDeleted bool) error
- func (cc *ClusterControllerImple) OnCertificateChanged(name string, cert string, isDeleted bool) error
- func (cc *ClusterControllerImple) SetCancellationFunc(f func())
- func (cc *ClusterControllerImple) SetSynchronizedRevision(id int64)
- func (cc *ClusterControllerImple) UnLock()
- func (cc *ClusterControllerImple) UpdateClusterSettings(settings entities.LightningMonkeyClusterSettings) ClusterController
- type ClusterETCDJobStrategy
- type ClusterJobScheduler
- type ClusterJobSchedulerImple
- type ClusterJobStrategy
- type ClusterKubernetesDNSJobStrategy
- type ClusterKubernetesMasterJobStrategy
- type ClusterKubernetesMinionJobStrategy
- type ClusterKubernetesNetworkStackJobStrategy
- type ClusterManager
- func (cm *ClusterManager) GetAgentFromETCD(clusterId, agentId string) (*entities.LightningMonkeyAgent, error)
- func (cm *ClusterManager) GetClusterById(clusterId string) (ClusterController, error)
- func (cm *ClusterManager) GetClusterCertificateByName(clusterId string, certName string) (string, error)
- func (cm *ClusterManager) GetClusterCertificates(clusterId string) (entities.LightningMonkeyCertificateCollection, error)
- func (cm *ClusterManager) Initialize(storageDriver storage.LightningMonkeyStorageDriver) error
- func (cm *ClusterManager) Register(cc ClusterController) error
- type ClusterManagerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentCache ¶
func (*AgentCache) GetAgentsAddress ¶
func (ac *AgentCache) GetAgentsAddress(role string, mustStatusFlag entities.AgentStatusFlag) []string
func (*AgentCache) GetETCDCount ¶
func (ac *AgentCache) GetETCDCount() int
func (*AgentCache) GetFirstProvisionedKubernetesMasterAgent ¶
func (ac *AgentCache) GetFirstProvisionedKubernetesMasterAgent() *entities.LightningMonkeyAgent
func (*AgentCache) GetKubernetesMasterCount ¶
func (ac *AgentCache) GetKubernetesMasterCount() int
func (*AgentCache) GetKubernetesMinionCount ¶
func (ac *AgentCache) GetKubernetesMinionCount() int
func (*AgentCache) GetTotalCountByRole ¶
func (ac *AgentCache) GetTotalCountByRole(role string) int
func (*AgentCache) GetTotalProvisionedCountByRole ¶
func (ac *AgentCache) GetTotalProvisionedCountByRole(role string) int
func (*AgentCache) Initialize ¶
func (ac *AgentCache) Initialize()
func (*AgentCache) InitializeWithValues ¶
func (ac *AgentCache) InitializeWithValues(etcd, k8sMaster, k8sMinion map[string]*entities.LightningMonkeyAgent)
func (*AgentCache) Offline ¶
func (ac *AgentCache) Offline(agent entities.LightningMonkeyAgent)
func (*AgentCache) Online ¶
func (ac *AgentCache) Online(agent entities.LightningMonkeyAgent)
type ClusterController ¶
type ClusterController interface { Dispose() //clean all of in use resource including backend watching jobs. GetSynchronizedRevision() int64 GetStatus() string GetClusterId() string GetCertificates() entities.LightningMonkeyCertificateCollection GetNextJob(agent entities.LightningMonkeyAgent) (entities.AgentJob, error) GetTotalCountByRole(role string) int GetTotalProvisionedCountByRole(role string) int GetSettings() entities.LightningMonkeyClusterSettings GetCachedAgent(agentId string) (*entities.LightningMonkeyAgent, error) Initialize(sd storage.LightningMonkeyStorageDriver) SetSynchronizedRevision(id int64) SetCancellationFunc(f func()) //used for disposing in use resource. Lock() UnLock() UpdateClusterSettings(settings entities.LightningMonkeyClusterSettings) ClusterController OnAgentChanged(agent entities.LightningMonkeyAgent, isDeleted bool) error OnCertificateChanged(name string, cert string, isDeleted bool) error InitializeKubernetesClient() error InitializeNetworkController() error InitializeDNSController() error GetNetworkController() controllers.NetworkStackController GetDNSController() controllers.DNSDeploymentController }
type ClusterControllerImple ¶
type ClusterControllerImple struct {
// contains filtered or unexported fields
}
func (*ClusterControllerImple) Dispose ¶
func (cc *ClusterControllerImple) Dispose()
func (*ClusterControllerImple) GetCachedAgent ¶
func (cc *ClusterControllerImple) GetCachedAgent(agentId string) (*entities.LightningMonkeyAgent, error)
func (*ClusterControllerImple) GetCertificates ¶
func (cc *ClusterControllerImple) GetCertificates() entities.LightningMonkeyCertificateCollection
func (*ClusterControllerImple) GetClusterId ¶
func (cc *ClusterControllerImple) GetClusterId() string
func (*ClusterControllerImple) GetDNSController ¶ added in v0.0.43
func (cc *ClusterControllerImple) GetDNSController() controllers.DNSDeploymentController
func (*ClusterControllerImple) GetNetworkController ¶
func (cc *ClusterControllerImple) GetNetworkController() controllers.NetworkStackController
func (*ClusterControllerImple) GetNextJob ¶
func (cc *ClusterControllerImple) GetNextJob(agent entities.LightningMonkeyAgent) (entities.AgentJob, error)
func (*ClusterControllerImple) GetSettings ¶
func (cc *ClusterControllerImple) GetSettings() entities.LightningMonkeyClusterSettings
func (*ClusterControllerImple) GetStatus ¶
func (cc *ClusterControllerImple) GetStatus() string
func (*ClusterControllerImple) GetSynchronizedRevision ¶
func (cc *ClusterControllerImple) GetSynchronizedRevision() int64
func (*ClusterControllerImple) GetTotalCountByRole ¶
func (cc *ClusterControllerImple) GetTotalCountByRole(role string) int
used for debugging internal state.
func (*ClusterControllerImple) GetTotalProvisionedCountByRole ¶
func (cc *ClusterControllerImple) GetTotalProvisionedCountByRole(role string) int
used for debugging internal state.
func (*ClusterControllerImple) Initialize ¶
func (cc *ClusterControllerImple) Initialize(sd storage.LightningMonkeyStorageDriver)
func (*ClusterControllerImple) InitializeDNSController ¶ added in v0.0.43
func (cc *ClusterControllerImple) InitializeDNSController() error
func (*ClusterControllerImple) InitializeKubernetesClient ¶
func (cc *ClusterControllerImple) InitializeKubernetesClient() error
func (*ClusterControllerImple) InitializeNetworkController ¶
func (cc *ClusterControllerImple) InitializeNetworkController() error
func (*ClusterControllerImple) Lock ¶
func (cc *ClusterControllerImple) Lock()
func (*ClusterControllerImple) OnAgentChanged ¶
func (cc *ClusterControllerImple) OnAgentChanged(agent entities.LightningMonkeyAgent, isDeleted bool) error
func (*ClusterControllerImple) OnCertificateChanged ¶
func (cc *ClusterControllerImple) OnCertificateChanged(name string, cert string, isDeleted bool) error
func (*ClusterControllerImple) SetCancellationFunc ¶
func (cc *ClusterControllerImple) SetCancellationFunc(f func())
func (*ClusterControllerImple) SetSynchronizedRevision ¶
func (cc *ClusterControllerImple) SetSynchronizedRevision(id int64)
func (*ClusterControllerImple) UnLock ¶
func (cc *ClusterControllerImple) UnLock()
func (*ClusterControllerImple) UpdateClusterSettings ¶
func (cc *ClusterControllerImple) UpdateClusterSettings(settings entities.LightningMonkeyClusterSettings) ClusterController
type ClusterETCDJobStrategy ¶
type ClusterETCDJobStrategy struct { }
func (*ClusterETCDJobStrategy) CanDeploy ¶
func (js *ClusterETCDJobStrategy) CanDeploy(cc ClusterController, agent entities.LightningMonkeyAgent, cache *AgentCache) (entities.ConditionCheckedResult, string, map[string]string, error)
func (*ClusterETCDJobStrategy) GetStrategyName ¶
func (js *ClusterETCDJobStrategy) GetStrategyName() string
type ClusterJobScheduler ¶
type ClusterJobScheduler interface { InitializeStrategies() GetNextJob(cc ClusterController, agent entities.LightningMonkeyAgent, cache *AgentCache) (entities.AgentJob, error) }
type ClusterJobSchedulerImple ¶
type ClusterJobSchedulerImple struct {
// contains filtered or unexported fields
}
func (*ClusterJobSchedulerImple) GetNextJob ¶
func (js *ClusterJobSchedulerImple) GetNextJob(cc ClusterController, agent entities.LightningMonkeyAgent, cache *AgentCache) (entities.AgentJob, error)
func (*ClusterJobSchedulerImple) InitializeStrategies ¶
func (js *ClusterJobSchedulerImple) InitializeStrategies()
type ClusterJobStrategy ¶
type ClusterJobStrategy interface { GetStrategyName() string CanDeploy(cc ClusterController, agent entities.LightningMonkeyAgent, cache *AgentCache) (entities.ConditionCheckedResult, string, map[string]string, error) }
type ClusterKubernetesDNSJobStrategy ¶ added in v0.0.43
type ClusterKubernetesDNSJobStrategy struct { }
func (*ClusterKubernetesDNSJobStrategy) CanDeploy ¶ added in v0.0.43
func (js *ClusterKubernetesDNSJobStrategy) CanDeploy(cc ClusterController, agent entities.LightningMonkeyAgent, cache *AgentCache) (entities.ConditionCheckedResult, string, map[string]string, error)
func (*ClusterKubernetesDNSJobStrategy) GetStrategyName ¶ added in v0.0.43
func (js *ClusterKubernetesDNSJobStrategy) GetStrategyName() string
type ClusterKubernetesMasterJobStrategy ¶
type ClusterKubernetesMasterJobStrategy struct { }
func (*ClusterKubernetesMasterJobStrategy) CanDeploy ¶
func (js *ClusterKubernetesMasterJobStrategy) CanDeploy(cc ClusterController, agent entities.LightningMonkeyAgent, cache *AgentCache) (entities.ConditionCheckedResult, string, map[string]string, error)
func (*ClusterKubernetesMasterJobStrategy) GetStrategyName ¶
func (js *ClusterKubernetesMasterJobStrategy) GetStrategyName() string
type ClusterKubernetesMinionJobStrategy ¶
type ClusterKubernetesMinionJobStrategy struct { }
func (*ClusterKubernetesMinionJobStrategy) CanDeploy ¶
func (js *ClusterKubernetesMinionJobStrategy) CanDeploy(cc ClusterController, agent entities.LightningMonkeyAgent, cache *AgentCache) (entities.ConditionCheckedResult, string, map[string]string, error)
func (*ClusterKubernetesMinionJobStrategy) GetStrategyName ¶
func (js *ClusterKubernetesMinionJobStrategy) GetStrategyName() string
type ClusterKubernetesNetworkStackJobStrategy ¶
type ClusterKubernetesNetworkStackJobStrategy struct { }
func (*ClusterKubernetesNetworkStackJobStrategy) CanDeploy ¶
func (js *ClusterKubernetesNetworkStackJobStrategy) CanDeploy(cc ClusterController, agent entities.LightningMonkeyAgent, cache *AgentCache) (entities.ConditionCheckedResult, string, map[string]string, error)
func (*ClusterKubernetesNetworkStackJobStrategy) GetStrategyName ¶
func (js *ClusterKubernetesNetworkStackJobStrategy) GetStrategyName() string
type ClusterManager ¶
type ClusterManager struct {
// contains filtered or unexported fields
}
func (*ClusterManager) GetAgentFromETCD ¶
func (cm *ClusterManager) GetAgentFromETCD(clusterId, agentId string) (*entities.LightningMonkeyAgent, error)
func (*ClusterManager) GetClusterById ¶
func (cm *ClusterManager) GetClusterById(clusterId string) (ClusterController, error)
func (*ClusterManager) GetClusterCertificateByName ¶
func (cm *ClusterManager) GetClusterCertificateByName(clusterId string, certName string) (string, error)
func (*ClusterManager) GetClusterCertificates ¶
func (cm *ClusterManager) GetClusterCertificates(clusterId string) (entities.LightningMonkeyCertificateCollection, error)
func (*ClusterManager) Initialize ¶
func (cm *ClusterManager) Initialize(storageDriver storage.LightningMonkeyStorageDriver) error
func (*ClusterManager) Register ¶
func (cm *ClusterManager) Register(cc ClusterController) error
type ClusterManagerInterface ¶
type ClusterManagerInterface interface { Initialize(storageDriver storage.LightningMonkeyStorageDriver) error GetClusterCertificateByName(clusterId string, certName string) (string, error) GetClusterCertificates(clusterId string) (entities.LightningMonkeyCertificateCollection, error) GetClusterById(clusterId string) (ClusterController, error) GetAgentFromETCD(clusterId, agentId string) (*entities.LightningMonkeyAgent, error) Register(cc ClusterController) error }
Click to show internal directories.
Click to hide internal directories.