Documentation
¶
Index ¶
- Variables
- func NewEventInMemoryAdapter() types.EventAdapterPort
- func NewInstanceFSAdapter() types.InstanceAdapterPort
- func NewInstanceLogsFSAdapter() types.InstanceLogsAdapterPort
- func NewPackageFSAdapter(params *PackageFSAdapterParams) types.PackageAdapterPort
- func NewProxyFSAdapter(params *ProxyFSAdapterParams) types.ProxyAdapterPort
- func NewServiceFSAdapter(params *ServiceFSAdapterParams) types.ServiceAdapterPort
- func NewSettingsFSAdapter(params *SettingsFSAdapterParams) types.SettingsAdapterPort
- type EventInMemoryAdapter
- type InstanceFSAdapter
- func (a *InstanceFSAdapter) Delete(uuid uuid.UUID) error
- func (a *InstanceFSAdapter) Exists(uuid uuid.UUID) bool
- func (a *InstanceFSAdapter) Get(uuid uuid.UUID) (*types.Instance, error)
- func (a *InstanceFSAdapter) GetAll() map[uuid.UUID]*types.Instance
- func (a *InstanceFSAdapter) GetPath(uuid uuid.UUID) string
- func (a *InstanceFSAdapter) LoadEnv(i *types.Instance) error
- func (a *InstanceFSAdapter) LoadSettings(i *types.Instance) error
- func (a *InstanceFSAdapter) ReadService(instancePath string) (types.Service, error)
- func (a *InstanceFSAdapter) Reload(load func(uuid uuid.UUID))
- func (a *InstanceFSAdapter) SaveEnv(i *types.Instance, variables map[string]string) error
- func (a *InstanceFSAdapter) SaveSettings(i *types.Instance) error
- func (a *InstanceFSAdapter) Set(uuid uuid.UUID, instance types.Instance) error
- type InstanceLogger
- type InstanceLogsFSAdapter
- func (a *InstanceLogsFSAdapter) Close(uuid uuid.UUID) error
- func (a *InstanceLogsFSAdapter) CloseAll() error
- func (a *InstanceLogsFSAdapter) LoadBuffer(uuid uuid.UUID) ([]types.LogLine, error)
- func (a *InstanceLogsFSAdapter) Open(uuid uuid.UUID) error
- func (a *InstanceLogsFSAdapter) Push(uuid uuid.UUID, line types.LogLine)
- type PackageFSAdapter
- type PackageFSAdapterParams
- type ProxyFSAdapter
- type ProxyFSAdapterParams
- type RunnerDockerAdapter
- func (a RunnerDockerAdapter) CheckForUpdates(instance *types.Instance) error
- func (a RunnerDockerAdapter) Delete(instance *types.Instance) error
- func (a RunnerDockerAdapter) HasUpdateAvailable(instance types.Instance) (bool, error)
- func (a RunnerDockerAdapter) Info(instance types.Instance) (map[string]any, error)
- func (a RunnerDockerAdapter) Start(instance *types.Instance, onLog func(msg string), onErr func(msg string), ...) error
- func (a RunnerDockerAdapter) Stop(instance *types.Instance) error
- type RunnerFSAdapter
- func (a RunnerFSAdapter) CheckForUpdates(instance *types.Instance) error
- func (a RunnerFSAdapter) Delete(instance *types.Instance) error
- func (a RunnerFSAdapter) HasUpdateAvailable(instance types.Instance) (bool, error)
- func (a RunnerFSAdapter) Info(instance types.Instance) (map[string]any, error)
- func (a RunnerFSAdapter) Start(instance *types.Instance, onLog func(msg string), onErr func(msg string), ...) error
- func (a RunnerFSAdapter) Stop(instance *types.Instance) error
- type ServiceFSAdapter
- type ServiceFSAdapterParams
- type SettingsFSAdapter
- type SettingsFSAdapterParams
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInstanceAlreadyExists = errors.New("instance already exists") ErrContainerNotFound = errors.New("container not found") )
View Source
var (
ErrLoggerNotFound = errors.New("instance logger not found")
)
View Source
var (
ErrPkgNotFound = errors.New("package not found")
)
Functions ¶
func NewEventInMemoryAdapter ¶
func NewEventInMemoryAdapter() types.EventAdapterPort
func NewInstanceFSAdapter ¶
func NewInstanceFSAdapter() types.InstanceAdapterPort
func NewInstanceLogsFSAdapter ¶
func NewInstanceLogsFSAdapter() types.InstanceLogsAdapterPort
func NewPackageFSAdapter ¶
func NewPackageFSAdapter(params *PackageFSAdapterParams) types.PackageAdapterPort
func NewProxyFSAdapter ¶
func NewProxyFSAdapter(params *ProxyFSAdapterParams) types.ProxyAdapterPort
func NewServiceFSAdapter ¶
func NewServiceFSAdapter(params *ServiceFSAdapterParams) types.ServiceAdapterPort
func NewSettingsFSAdapter ¶
func NewSettingsFSAdapter(params *SettingsFSAdapterParams) types.SettingsAdapterPort
Types ¶
type EventInMemoryAdapter ¶
type EventInMemoryAdapter struct {
// contains filtered or unexported fields
}
func (*EventInMemoryAdapter) AddListener ¶
func (a *EventInMemoryAdapter) AddListener(l types.Listener)
func (*EventInMemoryAdapter) RemoveListener ¶
func (a *EventInMemoryAdapter) RemoveListener(l types.Listener)
func (*EventInMemoryAdapter) Send ¶
func (a *EventInMemoryAdapter) Send(e interface{})
type InstanceFSAdapter ¶
type InstanceFSAdapter struct {
// contains filtered or unexported fields
}
func (*InstanceFSAdapter) Get ¶
Get returns an instance by its UUID. If the instance does not exist, it returns ErrInstanceNotFound.
func (*InstanceFSAdapter) GetAll ¶
func (a *InstanceFSAdapter) GetAll() map[uuid.UUID]*types.Instance
func (*InstanceFSAdapter) LoadSettings ¶
func (a *InstanceFSAdapter) LoadSettings(i *types.Instance) error
func (*InstanceFSAdapter) ReadService ¶
func (a *InstanceFSAdapter) ReadService(instancePath string) (types.Service, error)
func (*InstanceFSAdapter) Reload ¶
func (a *InstanceFSAdapter) Reload(load func(uuid uuid.UUID))
func (*InstanceFSAdapter) SaveSettings ¶
func (a *InstanceFSAdapter) SaveSettings(i *types.Instance) error
type InstanceLogger ¶
type InstanceLogger struct {
// contains filtered or unexported fields
}
func (*InstanceLogger) Close ¶
func (l *InstanceLogger) Close() error
type InstanceLogsFSAdapter ¶
type InstanceLogsFSAdapter struct {
// contains filtered or unexported fields
}
func (*InstanceLogsFSAdapter) CloseAll ¶
func (a *InstanceLogsFSAdapter) CloseAll() error
func (*InstanceLogsFSAdapter) LoadBuffer ¶
type PackageFSAdapter ¶
type PackageFSAdapter struct {
// contains filtered or unexported fields
}
func (*PackageFSAdapter) GetByID ¶
func (a *PackageFSAdapter) GetByID(id string) (types.Package, error)
func (*PackageFSAdapter) GetPath ¶
func (a *PackageFSAdapter) GetPath(id string) string
func (*PackageFSAdapter) Reload ¶
func (a *PackageFSAdapter) Reload() error
type PackageFSAdapterParams ¶
type PackageFSAdapterParams struct {
// contains filtered or unexported fields
}
type ProxyFSAdapter ¶ added in v0.5.8
type ProxyFSAdapter struct {
// contains filtered or unexported fields
}
func (*ProxyFSAdapter) AddRedirect ¶ added in v0.5.8
func (a *ProxyFSAdapter) AddRedirect(id uuid.UUID, redirect types.ProxyRedirect) error
func (*ProxyFSAdapter) GetRedirects ¶ added in v0.5.8
func (a *ProxyFSAdapter) GetRedirects() types.ProxyRedirects
func (*ProxyFSAdapter) RemoveRedirect ¶ added in v0.5.8
func (a *ProxyFSAdapter) RemoveRedirect(id uuid.UUID) error
type ProxyFSAdapterParams ¶
type ProxyFSAdapterParams struct {
// contains filtered or unexported fields
}
type RunnerDockerAdapter ¶
type RunnerDockerAdapter struct {
// contains filtered or unexported fields
}
func NewRunnerDockerAdapter ¶
func NewRunnerDockerAdapter() RunnerDockerAdapter
func (RunnerDockerAdapter) CheckForUpdates ¶
func (a RunnerDockerAdapter) CheckForUpdates(instance *types.Instance) error
func (RunnerDockerAdapter) Delete ¶
func (a RunnerDockerAdapter) Delete(instance *types.Instance) error
func (RunnerDockerAdapter) HasUpdateAvailable ¶
func (a RunnerDockerAdapter) HasUpdateAvailable(instance types.Instance) (bool, error)
type RunnerFSAdapter ¶
type RunnerFSAdapter struct {
// contains filtered or unexported fields
}
func NewRunnerFSAdapter ¶
func NewRunnerFSAdapter() RunnerFSAdapter
func (RunnerFSAdapter) CheckForUpdates ¶
func (a RunnerFSAdapter) CheckForUpdates(instance *types.Instance) error
func (RunnerFSAdapter) HasUpdateAvailable ¶
func (a RunnerFSAdapter) HasUpdateAvailable(instance types.Instance) (bool, error)
type ServiceFSAdapter ¶
type ServiceFSAdapter struct {
// contains filtered or unexported fields
}
func (*ServiceFSAdapter) GetAll ¶
func (a *ServiceFSAdapter) GetAll() []types.Service
func (*ServiceFSAdapter) GetScript ¶
func (a *ServiceFSAdapter) GetScript(id string) ([]byte, error)
func (*ServiceFSAdapter) Reload ¶
func (a *ServiceFSAdapter) Reload() error
type ServiceFSAdapterParams ¶
type ServiceFSAdapterParams struct {
// contains filtered or unexported fields
}
type SettingsFSAdapter ¶
type SettingsFSAdapter struct {
// contains filtered or unexported fields
}
func (*SettingsFSAdapter) GetNotificationsWebhook ¶
func (a *SettingsFSAdapter) GetNotificationsWebhook() *string
func (*SettingsFSAdapter) GetSettings ¶
func (a *SettingsFSAdapter) GetSettings() types.Settings
func (*SettingsFSAdapter) SetNotificationsWebhook ¶
func (a *SettingsFSAdapter) SetNotificationsWebhook(webhook *string) error
type SettingsFSAdapterParams ¶
type SettingsFSAdapterParams struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.