manager

package
v0.13.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 20 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderHandshakeConfig = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "DAYTONA_PROVIDER_PLUGIN",
	MagicCookieValue: "daytona_provider",
}

Functions

func GetDefaultProviders

func GetDefaultProviders(manifest ProvidersManifest) map[string]*Version

func HasUpdateAvailable added in v0.3.0

func HasUpdateAvailable(providerName string, currentVersion string, manifest ProvidersManifest) bool

Types

type IProviderManager added in v0.12.0

type IProviderManager interface {
	DownloadProvider(downloadUrls map[os_util.OperatingSystem]string, providerName string, throwIfPresent bool) (string, error)
	GetProvider(name string) (*Provider, error)
	GetProviders() map[string]Provider
	GetProvidersManifest() (*ProvidersManifest, error)
	RegisterProvider(pluginPath string) error
	TerminateProviderProcesses(providersBasePath string) error
	UninstallProvider(name string) error
}

type ProviderManager added in v0.11.0

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

func NewProviderManager added in v0.11.0

func NewProviderManager(config ProviderManagerConfig) *ProviderManager

func (*ProviderManager) DownloadProvider added in v0.11.0

func (m *ProviderManager) DownloadProvider(downloadUrls map[os.OperatingSystem]string, providerName string, throwIfPresent bool) (string, error)

func (*ProviderManager) GetProvider added in v0.11.0

func (m *ProviderManager) GetProvider(name string) (*Provider, error)

func (*ProviderManager) GetProviders added in v0.11.0

func (m *ProviderManager) GetProviders() map[string]Provider

func (*ProviderManager) GetProvidersManifest added in v0.11.0

func (m *ProviderManager) GetProvidersManifest() (*ProvidersManifest, error)

func (*ProviderManager) RegisterProvider added in v0.11.0

func (m *ProviderManager) RegisterProvider(pluginPath string) error

func (*ProviderManager) TerminateProviderProcesses added in v0.11.0

func (m *ProviderManager) TerminateProviderProcesses(providersBasePath string) error

func (*ProviderManager) UninstallProvider added in v0.11.0

func (m *ProviderManager) UninstallProvider(name string) error

type ProviderManagerConfig added in v0.11.0

type ProviderManagerConfig struct {
	ServerDownloadUrl     string
	ServerUrl             string
	ServerApiUrl          string
	LogsDir               string
	ProviderTargetService providertargets.IProviderTargetService
	RegistryUrl           string
	BaseDir               string
}

type ProviderManifest

type ProviderManifest struct {
	Default  bool               `json:"default"`
	Versions map[string]Version `json:"versions"`
}

type ProvidersManifest

type ProvidersManifest map[string]ProviderManifest

func GetProvidersManifest

func GetProvidersManifest(registryUrl string) (*ProvidersManifest, error)

FIXME: temporary pollyfill

type Version

type Version struct {
	DownloadUrls map[os.OperatingSystem]string `json:"downloadUrls"`
}

func FindLatestVersion

func FindLatestVersion(providerManifest ProviderManifest) *Version

Jump to

Keyboard shortcuts

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