providermanager

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 16 Imported by: 4

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 GetProviderManager

func GetProviderManager(config *ProviderManagerConfig) *providerManagerImpl

func IsNoPluginFound

func IsNoPluginFound(err error, dir string) bool

func IsProviderAlreadyDownloaded

func IsProviderAlreadyDownloaded(err error, name string) bool

Types

type IProviderManager

type IProviderManager interface {
	DownloadProvider(ctx context.Context, downloadUrls map[os_util.OperatingSystem]string, providerName string) (string, error)
	GetProvider(name string) (*provider.Provider, error)
	GetProviders() map[string]provider.Provider
	RegisterProvider(pluginPath string, manualInstall bool) error
	TerminateProviderProcesses(providersBasePath string) error
	UninstallProvider(name string) error
	Purge() error
}

type ProviderManagerConfig

type ProviderManagerConfig struct {
	GetTargetConfigMap       func(ctx context.Context) (map[string]*models.TargetConfig, error)
	CreateTargetConfig       func(ctx context.Context, name, options string, providerInfo models.ProviderInfo) error
	CreateProviderNetworkKey func(ctx context.Context, providerName string) (string, error)
	RunnerId                 string
	RunnerName               string
	DaytonaDownloadUrl       string
	ServerUrl                string
	ApiUrl                   string
	ApiKey                   *string
	WorkspaceLogsDir         string
	TargetLogsDir            string
	BaseDir                  string
	ServerPort               uint32
	ApiPort                  uint32
	Logger                   *log.Logger
}

Jump to

Keyboard shortcuts

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