manager

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 20 Imported by: 9

Documentation

Index

Constants

View Source
const INITIAL_SETUP_LOCK_FILE_NAME = "initial-setup.lock"

Variables

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

Functions

func IsNoPluginFound added in v0.42.1

func IsNoPluginFound(err error, dir string) bool

func IsProviderAlreadyDownloaded added in v0.42.1

func IsProviderAlreadyDownloaded(err error, name string) bool

Types

type IProviderManager added in v0.12.0

type IProviderManager interface {
	DownloadProvider(ctx context.Context, downloadUrls map[os_util.OperatingSystem]string, providerName string) (string, error)
	GetProvider(name string) (*Provider, error)
	GetProviders() map[string]Provider
	GetProvidersManifest() (*ProvidersManifest, error)
	RegisterProvider(pluginPath string, manualInstall bool) error
	TerminateProviderProcesses(providersBasePath string) error
	UninstallProvider(name string) error
	Purge() 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(ctx context.Context, downloadUrls map[os.OperatingSystem]string, providerName string) (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) Purge added in v0.25.0

func (m *ProviderManager) Purge() error

func (*ProviderManager) RegisterProvider added in v0.11.0

func (m *ProviderManager) RegisterProvider(pluginPath string, manualInstall bool) 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 {
	DaytonaDownloadUrl       string
	ServerUrl                string
	ServerVersion            string
	ApiUrl                   string
	LogsDir                  string
	ProviderTargetService    providertargets.IProviderTargetService
	RegistryUrl              string
	BaseDir                  string
	CreateProviderNetworkKey func(providerName string) (string, error)
	ServerPort               uint32
	ApiPort                  uint32
}

type ProviderManifest

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

func (*ProviderManifest) FindLatestVersion added in v0.18.0

func (p *ProviderManifest) FindLatestVersion() (string, *Version)

type ProvidersManifest

type ProvidersManifest map[string]ProviderManifest

func (*ProvidersManifest) GetDefaultProviders added in v0.18.0

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

func (*ProvidersManifest) GetLatestVersions added in v0.18.0

func (m *ProvidersManifest) GetLatestVersions() *ProvidersManifest

func (*ProvidersManifest) HasUpdateAvailable added in v0.18.0

func (p *ProvidersManifest) HasUpdateAvailable(providerName string, currentVersion string) bool

type Version

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

Jump to

Keyboard shortcuts

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