Documentation ¶
Index ¶
- Variables
- type ImageProvider
- type InstanceInfo
- type Launcher
- func (launcher *Launcher) Close()
- func (launcher *Launcher) GetNodesConfiguration() []cloudprotocol.NodeInfo
- func (launcher *Launcher) GetRunStatusesChannel() <-chan unitstatushandler.RunInstancesStatus
- func (launcher *Launcher) RestartInstances() error
- func (launcher *Launcher) RunInstances(instances []cloudprotocol.InstanceInfo, newServices []string) error
- type NetworkManager
- type NodeInfo
- type NodeManager
- type NodeRunInstanceStatus
- type ResourceManager
- type Storage
- type StorageStateProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotExist = errors.New("entry not exist")
Functions ¶
This section is empty.
Types ¶
type ImageProvider ¶
type ImageProvider interface { GetServiceInfo(serviceID string) (imagemanager.ServiceInfo, error) GetLayerInfo(digest string) (imagemanager.LayerInfo, error) RevertService(serviceID string) error }
ImageProvider provides image information.
type InstanceInfo ¶
type InstanceInfo struct { aostypes.InstanceIdent UID int }
type Launcher ¶
Launcher service instances launcher.
func New ¶
func New( config *config.Config, storage Storage, nodeManager NodeManager, imageProvider ImageProvider, resourceManager ResourceManager, storageStateProvider StorageStateProvider, networkManager NetworkManager, ) (launcher *Launcher, err error)
New creates launcher instance.
func (*Launcher) GetNodesConfiguration ¶
func (launcher *Launcher) GetNodesConfiguration() []cloudprotocol.NodeInfo
GetNodesConfiguration gets nodes configuration.
func (*Launcher) GetRunStatusesChannel ¶
func (launcher *Launcher) GetRunStatusesChannel() <-chan unitstatushandler.RunInstancesStatus
GetRunStatusesChannel gets channel with run status instances status.
func (*Launcher) RestartInstances ¶
RestartInstances performs restart service instances.
func (*Launcher) RunInstances ¶
func (launcher *Launcher) RunInstances(instances []cloudprotocol.InstanceInfo, newServices []string) error
RunInstances performs run service instances.
type NetworkManager ¶
type NetworkManager interface { PrepareInstanceNetworkParameters( instanceIdent aostypes.InstanceIdent, networkID string, params networkmanager.NetworkParameters) (aostypes.NetworkParameters, error) RemoveInstanceNetworkParameters(instanceIdent aostypes.InstanceIdent, networkID string) RestartDNSServer() error GetInstances() []aostypes.InstanceIdent UpdateProviderNetwork(providers []string, nodeID string) error }
NetworkManager network manager interface.
type NodeInfo ¶
type NodeInfo struct { cloudprotocol.NodeInfo RemoteNode bool RunnerFeature []string }
NodeConfiguration node static configuration.
type NodeManager ¶
type NodeManager interface { GetNodeConfiguration(nodeID string) (NodeInfo, error) RunInstances( nodeID string, services []aostypes.ServiceInfo, layers []aostypes.LayerInfo, instances []aostypes.InstanceInfo, forceRestart bool, ) error GetRunInstancesStatusChannel() <-chan NodeRunInstanceStatus GetSystemLimitAlertChannel() <-chan cloudprotocol.SystemQuotaAlert GetNodeMonitoringData(nodeID string) (data cloudprotocol.NodeMonitoringData, err error) }
NodeManager nodes controller.
type NodeRunInstanceStatus ¶
type NodeRunInstanceStatus struct { NodeID string NodeType string Instances []cloudprotocol.InstanceStatus }
NodeRunInstanceStatus instance run status for the node.
type ResourceManager ¶
type ResourceManager interface {
GetUnitConfiguration(nodeType string) aostypes.NodeUnitConfig
}
ResourceManager provides node resources.
type Storage ¶
type Storage interface { AddInstance(instanceInfo InstanceInfo) error RemoveInstance(instanceIdent aostypes.InstanceIdent) error GetInstanceUID(instance aostypes.InstanceIdent) (int, error) GetInstances() ([]InstanceInfo, error) SetDesiredInstances(instances json.RawMessage) error GetDesiredInstances() (json.RawMessage, error) SetNodeState(nodeID string, state json.RawMessage) error GetNodeState(nodeID string) (json.RawMessage, error) }
Storage storage interface.
type StorageStateProvider ¶
type StorageStateProvider interface { Setup(params storagestate.SetupParams) (storagePath string, statePath string, err error) Cleanup(instanceIdent aostypes.InstanceIdent) error GetInstanceCheckSum(instance aostypes.InstanceIdent) string }
StorageStateProvider instances storage state provider.
Click to show internal directories.
Click to hide internal directories.