Documentation ¶
Index ¶
- Constants
- type CAFilesManager
- type ExtensionManager
- func (manager *ExtensionManager) DisableExtension(extension *baasapi.Extension) error
- func (manager *ExtensionManager) EnableExtension(extension *baasapi.Extension, licenseKey string) error
- func (manager *ExtensionManager) FetchExtensionDefinitions() ([]baasapi.Extension, error)
- func (manager *ExtensionManager) UpdateExtension(extension *baasapi.Extension, version string) error
Constants ¶
const ( // Baas deployment files BaaSDeploymentPath = "k8s/ansible/vars/namespaces" BinaryStorePath = "bin" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CAFilesManager ¶
type CAFilesManager struct {
// contains filtered or unexported fields
}
CAFilesManager represents a service for managing cafiles.
func NewCAFilesManager ¶
func NewCAFilesManager(binaryPath, dataPath string, fileService baasapi.FileService) (*CAFilesManager, error)
NewCAFilesManager initializes a new CAFilesManager service.
type ExtensionManager ¶
type ExtensionManager struct {
// contains filtered or unexported fields
}
ExtensionManager represents a service used to manage extension processes.
func NewExtensionManager ¶
func NewExtensionManager(fileService baasapi.FileService, extensionService baasapi.ExtensionService) *ExtensionManager
NewExtensionManager returns a pointer to an ExtensionManager
func (*ExtensionManager) DisableExtension ¶
func (manager *ExtensionManager) DisableExtension(extension *baasapi.Extension) error
DisableExtension will retrieve the process associated to the extension from the processes map and kill the process. It will then remove the process from the processes map and remove the binary associated to the extension from the filesystem
func (*ExtensionManager) EnableExtension ¶
func (manager *ExtensionManager) EnableExtension(extension *baasapi.Extension, licenseKey string) error
EnableExtension will check for the existence of the extension binary on the filesystem first. If it does not exist, it will download it from the official BaaSapi assets server. After installing the binary on the filesystem, it will execute the binary in license check mode to validate the extension license. If the license is valid, it will then start the extension process and register it in the processes map.
func (*ExtensionManager) FetchExtensionDefinitions ¶
func (manager *ExtensionManager) FetchExtensionDefinitions() ([]baasapi.Extension, error)
FetchExtensionDefinitions will fetch the list of available extension definitions from the official BaaSapi assets server
func (*ExtensionManager) UpdateExtension ¶
func (manager *ExtensionManager) UpdateExtension(extension *baasapi.Extension, version string) error
UpdateExtension will download the new extension binary from the official BaaSapi assets server, disable the previous extension via DisableExtension, trigger a license check and then start the extension process and add it to the processes map