Documentation
¶
Index ¶
- Variables
- func NewEventInMemoryAdapter() types.EventAdapterPort
- func NewInstanceFSAdapter(params *InstanceFSAdapterParams) 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 DockerCliAdapter
- func (a DockerCliAdapter) BuildImage(options types.BuildImageOptions) (dockertypes.ImageBuildResponse, error)
- func (a DockerCliAdapter) CreateContainer(options types.CreateContainerOptions) (types.CreateContainerResponse, error)
- func (a DockerCliAdapter) DeleteContainer(id string) error
- func (a DockerCliAdapter) InfoContainer(id string) (types.InfoContainerResponse, error)
- func (a DockerCliAdapter) InfoImage(id string) (types.InfoImageResponse, error)
- func (a DockerCliAdapter) ListContainers() ([]types.Container, error)
- func (a DockerCliAdapter) LogsStderrContainer(id string) (io.ReadCloser, error)
- func (a DockerCliAdapter) LogsStdoutContainer(id string) (io.ReadCloser, error)
- func (a DockerCliAdapter) PullImage(options types.PullImageOptions) (io.ReadCloser, error)
- func (a DockerCliAdapter) StartContainer(id string) error
- func (a DockerCliAdapter) StopContainer(id string) error
- func (a DockerCliAdapter) WaitContainer(id string, cond types.WaitContainerCondition) error
- 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) GetFilePath(uuid uuid.UUID, filepath InstanceFilePath) string
- func (a *InstanceFSAdapter) GetPath(uuid uuid.UUID) string
- func (a *InstanceFSAdapter) LoadEnv(i *types.Instance) error
- func (a *InstanceFSAdapter) LoadService(instancePath string) (types.Service, error)
- func (a *InstanceFSAdapter) LoadServiceRaw(instancePath string) (interface{}, error)
- func (a *InstanceFSAdapter) LoadSettings(i *types.Instance) error
- func (a *InstanceFSAdapter) Reload(load func(uuid uuid.UUID))
- func (a *InstanceFSAdapter) SaveEnv(i *types.Instance) error
- func (a *InstanceFSAdapter) SaveService(instance *types.Instance) error
- func (a *InstanceFSAdapter) SaveSettings(i *types.Instance) error
- func (a *InstanceFSAdapter) Search(query types.InstanceQuery) map[uuid.UUID]*types.Instance
- func (a *InstanceFSAdapter) Set(uuid uuid.UUID, instance types.Instance) error
- type InstanceFSAdapterParams
- type InstanceFilePath
- 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, setStatus func(status string)) (io.ReadCloser, io.ReadCloser, 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, setStatus func(status string)) (stdout io.ReadCloser, stderr io.ReadCloser, err 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(params *InstanceFSAdapterParams) 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 DockerCliAdapter ¶ added in v0.9.0
type DockerCliAdapter struct {
// contains filtered or unexported fields
}
func NewDockerCliAdapter ¶ added in v0.9.0
func NewDockerCliAdapter() DockerCliAdapter
func (DockerCliAdapter) BuildImage ¶ added in v0.9.0
func (a DockerCliAdapter) BuildImage(options types.BuildImageOptions) (dockertypes.ImageBuildResponse, error)
func (DockerCliAdapter) CreateContainer ¶ added in v0.9.0
func (a DockerCliAdapter) CreateContainer(options types.CreateContainerOptions) (types.CreateContainerResponse, error)
func (DockerCliAdapter) DeleteContainer ¶ added in v0.9.0
func (a DockerCliAdapter) DeleteContainer(id string) error
func (DockerCliAdapter) InfoContainer ¶ added in v0.9.0
func (a DockerCliAdapter) InfoContainer(id string) (types.InfoContainerResponse, error)
func (DockerCliAdapter) InfoImage ¶ added in v0.9.0
func (a DockerCliAdapter) InfoImage(id string) (types.InfoImageResponse, error)
func (DockerCliAdapter) ListContainers ¶ added in v0.9.0
func (a DockerCliAdapter) ListContainers() ([]types.Container, error)
func (DockerCliAdapter) LogsStderrContainer ¶ added in v0.9.0
func (a DockerCliAdapter) LogsStderrContainer(id string) (io.ReadCloser, error)
func (DockerCliAdapter) LogsStdoutContainer ¶ added in v0.9.0
func (a DockerCliAdapter) LogsStdoutContainer(id string) (io.ReadCloser, error)
func (DockerCliAdapter) PullImage ¶ added in v0.9.0
func (a DockerCliAdapter) PullImage(options types.PullImageOptions) (io.ReadCloser, error)
func (DockerCliAdapter) StartContainer ¶ added in v0.9.0
func (a DockerCliAdapter) StartContainer(id string) error
func (DockerCliAdapter) StopContainer ¶ added in v0.9.0
func (a DockerCliAdapter) StopContainer(id string) error
func (DockerCliAdapter) WaitContainer ¶ added in v0.9.0
func (a DockerCliAdapter) WaitContainer(id string, cond types.WaitContainerCondition) error
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) GetFilePath ¶ added in v0.6.0
func (a *InstanceFSAdapter) GetFilePath(uuid uuid.UUID, filepath InstanceFilePath) string
func (*InstanceFSAdapter) LoadService ¶ added in v0.6.0
func (a *InstanceFSAdapter) LoadService(instancePath string) (types.Service, error)
func (*InstanceFSAdapter) LoadServiceRaw ¶ added in v0.6.0
func (a *InstanceFSAdapter) LoadServiceRaw(instancePath string) (interface{}, error)
func (*InstanceFSAdapter) LoadSettings ¶
func (a *InstanceFSAdapter) LoadSettings(i *types.Instance) error
func (*InstanceFSAdapter) Reload ¶
func (a *InstanceFSAdapter) Reload(load func(uuid uuid.UUID))
func (*InstanceFSAdapter) SaveService ¶ added in v0.6.0
func (a *InstanceFSAdapter) SaveService(instance *types.Instance) error
func (*InstanceFSAdapter) SaveSettings ¶
func (a *InstanceFSAdapter) SaveSettings(i *types.Instance) error
func (*InstanceFSAdapter) Search ¶ added in v0.6.0
func (a *InstanceFSAdapter) Search(query types.InstanceQuery) map[uuid.UUID]*types.Instance
type InstanceFSAdapterParams ¶ added in v0.6.0
type InstanceFSAdapterParams struct {
// contains filtered or unexported fields
}
type InstanceFilePath ¶ added in v0.6.0
type InstanceFilePath string
const ( InstanceVertexPath InstanceFilePath = ".vertex" InstanceSettingsPath InstanceFilePath = ".vertex/instance_settings.json" InstanceServicePath InstanceFilePath = ".vertex/service.yml" InstanceEnvPath InstanceFilePath = ".env" )
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) GetRedirectByHost ¶ added in v0.6.0
func (a *ProxyFSAdapter) GetRedirectByHost(host string) *types.ProxyRedirect
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{}
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)
func (RunnerDockerAdapter) Start ¶
func (a RunnerDockerAdapter) Start(instance *types.Instance, setStatus func(status string)) (io.ReadCloser, io.ReadCloser, 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)
func (RunnerFSAdapter) Start ¶
func (a RunnerFSAdapter) Start(instance *types.Instance, setStatus func(status string)) (stdout io.ReadCloser, stderr io.ReadCloser, err error)
type ServiceFSAdapter ¶
type ServiceFSAdapter struct {
// contains filtered or unexported fields
}
func (*ServiceFSAdapter) GetAll ¶
func (a *ServiceFSAdapter) GetAll() []types.Service
func (*ServiceFSAdapter) GetRaw ¶ added in v0.6.0
func (a *ServiceFSAdapter) GetRaw(id string) (interface{}, error)
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.