cache

package
v0.0.87 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentCache

type AgentCache struct {
	*sync.Mutex
	// contains filtered or unexported fields
}

func (*AgentCache) GetAdminConfFromMasterAgents added in v0.0.80

func (ac *AgentCache) GetAdminConfFromMasterAgents() string

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) GetHACount added in v0.0.74

func (ac *AgentCache) GetHACount() int

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, ha 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
	InitializeExtensionDeploymentController() error
	GetNetworkController() controllers.DeploymentController
	GetDNSController() controllers.DeploymentController
	GetExtensionDeploymentController() controllers.DeploymentController
	GetWachPoints() []monitors.WatchPoint
	GetRandomAdminConfFromMasterAgents() (string, error)
	EnableMonitors()
}

type ClusterControllerImple

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

func (*ClusterControllerImple) Dispose

func (cc *ClusterControllerImple) Dispose()

func (*ClusterControllerImple) EnableMonitors added in v0.0.65

func (cc *ClusterControllerImple) EnableMonitors()

func (*ClusterControllerImple) GetCachedAgent

func (cc *ClusterControllerImple) GetCachedAgent(agentId string) (*entities.LightningMonkeyAgent, error)

func (*ClusterControllerImple) GetCertificates

func (*ClusterControllerImple) GetClusterId

func (cc *ClusterControllerImple) GetClusterId() string

func (*ClusterControllerImple) GetDNSController added in v0.0.43

func (*ClusterControllerImple) GetExtensionDeploymentController added in v0.0.72

func (cc *ClusterControllerImple) GetExtensionDeploymentController() controllers.DeploymentController

func (*ClusterControllerImple) GetNetworkController

func (cc *ClusterControllerImple) GetNetworkController() controllers.DeploymentController

func (*ClusterControllerImple) GetNextJob

func (*ClusterControllerImple) GetRandomAdminConfFromMasterAgents added in v0.0.80

func (cc *ClusterControllerImple) GetRandomAdminConfFromMasterAgents() (string, error)

func (*ClusterControllerImple) GetSettings

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) GetWachPoints added in v0.0.64

func (cc *ClusterControllerImple) GetWachPoints() []monitors.WatchPoint

func (*ClusterControllerImple) Initialize

func (*ClusterControllerImple) InitializeDNSController added in v0.0.43

func (cc *ClusterControllerImple) InitializeDNSController() error

func (*ClusterControllerImple) InitializeExtensionDeploymentController added in v0.0.72

func (cc *ClusterControllerImple) InitializeExtensionDeploymentController() 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

type ClusterETCDJobStrategy

type ClusterETCDJobStrategy struct {
}

func (*ClusterETCDJobStrategy) CanDeploy

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 (*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 (*ClusterKubernetesDNSJobStrategy) GetStrategyName added in v0.0.43

func (js *ClusterKubernetesDNSJobStrategy) GetStrategyName() string

type ClusterKubernetesMasterJobStrategy

type ClusterKubernetesMasterJobStrategy struct {
}

func (*ClusterKubernetesMasterJobStrategy) CanDeploy

func (*ClusterKubernetesMasterJobStrategy) GetStrategyName

func (js *ClusterKubernetesMasterJobStrategy) GetStrategyName() string

type ClusterKubernetesMinionJobStrategy

type ClusterKubernetesMinionJobStrategy struct {
}

func (*ClusterKubernetesMinionJobStrategy) CanDeploy

func (*ClusterKubernetesMinionJobStrategy) GetStrategyName

func (js *ClusterKubernetesMinionJobStrategy) GetStrategyName() string

type ClusterKubernetesNetworkStackJobStrategy

type ClusterKubernetesNetworkStackJobStrategy struct {
}

func (*ClusterKubernetesNetworkStackJobStrategy) CanDeploy

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
}

type EnableMonitorsJobStrategy added in v0.0.65

type EnableMonitorsJobStrategy struct {
}

func (*EnableMonitorsJobStrategy) CanDeploy added in v0.0.65

func (*EnableMonitorsJobStrategy) GetStrategyName added in v0.0.65

func (js *EnableMonitorsJobStrategy) GetStrategyName() string

type ExtensibilityDeploymentJobStrategy added in v0.0.72

type ExtensibilityDeploymentJobStrategy struct {
}

func (*ExtensibilityDeploymentJobStrategy) CanDeploy added in v0.0.72

func (*ExtensibilityDeploymentJobStrategy) GetStrategyName added in v0.0.72

func (js *ExtensibilityDeploymentJobStrategy) GetStrategyName() string

type HAJobStrategy added in v0.0.72

type HAJobStrategy struct {
}

func (*HAJobStrategy) CanDeploy added in v0.0.72

func (*HAJobStrategy) GetStrategyName added in v0.0.72

func (js *HAJobStrategy) GetStrategyName() string

Jump to

Keyboard shortcuts

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