exec

package
v0.0.0-...-b1a156a Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Zlib Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
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.

func (*CAFilesManager) Deploy

func (manager *CAFilesManager) Deploy(creator string, namespace string, ansible_extra string, ansible_env string, ansible_config string, flag bool) error

Deploy executes the cafiles deploy command. Deploy(baask8s *Baask8s, creator string, networkID string) error

func (*CAFilesManager) GetLogs

func (manager *CAFilesManager) GetLogs(namespace string, nline int) (string, error)

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

Jump to

Keyboard shortcuts

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