Documentation
¶
Index ¶
- Constants
- Variables
- func NewContainerEnvService(adapter port.ContainerEnvAdapter) port.ContainerEnvService
- func NewContainerLogsService(ctx *app.Context, adapter port.ContainerLogsAdapter) port.ContainerLogsService
- func NewContainerRunnerService(ctx *app.Context, adapter port.ContainerRunnerAdapter) port.ContainerRunnerService
- func NewContainerService(params ContainerServiceParams) port.ContainerService
- func NewContainerServiceService(adapter port.ContainerServiceAdapter) port.ContainerServiceService
- func NewDockerKernelService(dockerAdapter port.DockerAdapter) port.DockerService
- func NewMetricsService(ctx *apptypes.Context) port.MetricsService
- type ContainerEnvService
- type ContainerLogsService
- type ContainerRunnerService
- func (s *ContainerRunnerService) CheckForUpdates(inst *types.Container) error
- func (s *ContainerRunnerService) Delete(inst *types.Container) error
- func (s *ContainerRunnerService) GetAllVersions(inst *types.Container, useCache bool) ([]string, error)
- func (s *ContainerRunnerService) GetDockerContainerInfo(inst types.Container) (map[string]any, error)
- func (s *ContainerRunnerService) Install(uuid uuid.UUID, service types.Service) error
- func (s *ContainerRunnerService) RecreateContainer(inst *types.Container) error
- func (s *ContainerRunnerService) Start(inst *types.Container) error
- func (s *ContainerRunnerService) Stop(inst *types.Container) error
- func (s *ContainerRunnerService) WaitStatus(inst *types.Container, status string) error
- type ContainerService
- func (s *ContainerService) CheckForUpdates() (map[uuid.UUID]*types.Container, error)
- func (s *ContainerService) Delete(inst *types.Container) error
- func (s *ContainerService) DeleteAll()
- func (s *ContainerService) Exists(uuid uuid.UUID) bool
- func (s *ContainerService) Get(uuid uuid.UUID) (*types.Container, error)
- func (s *ContainerService) GetAll() map[uuid.UUID]*types.Container
- func (s *ContainerService) GetTags() []string
- func (s *ContainerService) GetUUID() uuid.UUID
- func (s *ContainerService) Install(service types.Service, method string) (*types.Container, error)
- func (s *ContainerService) LoadAll()
- func (s *ContainerService) OnEvent(e event.Event) error
- func (s *ContainerService) Search(query types.ContainerSearchQuery) map[uuid.UUID]*types.Container
- func (s *ContainerService) SetDatabases(inst *types.Container, databases map[string]uuid.UUID, ...) error
- func (s *ContainerService) StartAll()
- func (s *ContainerService) StopAll()
- type ContainerServiceParams
- type ContainerServiceService
- func (s *ContainerServiceService) CheckForUpdate(inst *types.Container, latest types.Service) error
- func (s *ContainerServiceService) Load(uuid uuid.UUID) (types.Service, error)
- func (s *ContainerServiceService) Save(inst *types.Container, service types.Service) error
- func (s *ContainerServiceService) Update(inst *types.Container, service types.Service) error
- type ContainerSettingsService
- func (s *ContainerSettingsService) Load(inst *types.Container) error
- func (s *ContainerSettingsService) Save(inst *types.Container, settings types.ContainerSettings) error
- func (s *ContainerSettingsService) SetDatabases(inst *types.Container, databases map[string]uuid.UUID) error
- func (s *ContainerSettingsService) SetDisplayName(inst *types.Container, value string) error
- func (s *ContainerSettingsService) SetLaunchOnStartup(inst *types.Container, value bool) error
- func (s *ContainerSettingsService) SetTags(inst *types.Container, tags []string) error
- func (s *ContainerSettingsService) SetVersion(inst *types.Container, value string) error
- type DockerKernelService
- func (s DockerKernelService) BuildImage(options types.BuildImageOptions) (dockertypes.ImageBuildResponse, error)
- func (s DockerKernelService) CreateContainer(options types.CreateContainerOptions) (types.CreateContainerResponse, error)
- func (s DockerKernelService) DeleteContainer(id string) error
- func (s DockerKernelService) DeleteMounts(uuid string) error
- func (s DockerKernelService) InfoContainer(id string) (types.InfoContainerResponse, error)
- func (s DockerKernelService) InfoImage(id string) (types.InfoImageResponse, error)
- func (s DockerKernelService) ListContainers() ([]types.DockerContainer, error)
- func (s DockerKernelService) LogsStderrContainer(id string) (io.ReadCloser, error)
- func (s DockerKernelService) LogsStdoutContainer(id string) (io.ReadCloser, error)
- func (s DockerKernelService) PullImage(options types.PullImageOptions) (io.ReadCloser, error)
- func (s DockerKernelService) StartContainer(id string) error
- func (s DockerKernelService) StopContainer(id string) error
- func (s DockerKernelService) WaitContainer(id string, cond types.WaitContainerCondition) error
- type MetricsService
- type ServiceService
Constants ¶
View Source
const ( MetricIDContainerStatus = "vertex_container_status" MetricIDContainersCount = "vertex_containers_count" )
Variables ¶
View Source
var ( ErrContainerAlreadyExists = errors.New("container already exists") ErrContainerAlreadyRunning = errors.New("the container is already running") ErrContainerNotRunning = errors.New("the container is not running") ErrInstallMethodDoesNotExists = errors.New("this install method doesn't exist for this service") )
Functions ¶
func NewContainerEnvService ¶
func NewContainerEnvService(adapter port.ContainerEnvAdapter) port.ContainerEnvService
func NewContainerLogsService ¶
func NewContainerLogsService(ctx *app.Context, adapter port.ContainerLogsAdapter) port.ContainerLogsService
func NewContainerRunnerService ¶
func NewContainerRunnerService(ctx *app.Context, adapter port.ContainerRunnerAdapter) port.ContainerRunnerService
func NewContainerService ¶
func NewContainerService(params ContainerServiceParams) port.ContainerService
func NewContainerServiceService ¶
func NewContainerServiceService(adapter port.ContainerServiceAdapter) port.ContainerServiceService
func NewDockerKernelService ¶
func NewDockerKernelService(dockerAdapter port.DockerAdapter) port.DockerService
func NewMetricsService ¶
func NewMetricsService(ctx *apptypes.Context) port.MetricsService
Types ¶
type ContainerEnvService ¶
type ContainerEnvService struct {
// contains filtered or unexported fields
}
func (*ContainerEnvService) Save ¶
func (s *ContainerEnvService) Save(inst *types.Container, env types.ContainerEnvVariables) error
type ContainerLogsService ¶
type ContainerLogsService struct {
// contains filtered or unexported fields
}
func (*ContainerLogsService) GetLatestLogs ¶
func (*ContainerLogsService) GetUUID ¶
func (s *ContainerLogsService) GetUUID() uuid.UUID
type ContainerRunnerService ¶
type ContainerRunnerService struct {
// contains filtered or unexported fields
}
func (*ContainerRunnerService) CheckForUpdates ¶
func (s *ContainerRunnerService) CheckForUpdates(inst *types.Container) error
func (*ContainerRunnerService) Delete ¶
func (s *ContainerRunnerService) Delete(inst *types.Container) error
func (*ContainerRunnerService) GetAllVersions ¶
func (*ContainerRunnerService) GetDockerContainerInfo ¶
func (*ContainerRunnerService) RecreateContainer ¶
func (s *ContainerRunnerService) RecreateContainer(inst *types.Container) error
RecreateContainer recreates a container by its UUID.
func (*ContainerRunnerService) Start ¶
func (s *ContainerRunnerService) Start(inst *types.Container) error
Start starts a container by its UUID. If the container does not exist, it returns ErrContainerNotFound. If the container is already running, it returns ErrContainerAlreadyRunning.
func (*ContainerRunnerService) Stop ¶
func (s *ContainerRunnerService) Stop(inst *types.Container) error
Stop stops a container by its UUID. If the container does not exist, it returns ErrContainerNotFound. If the container is not running, it returns ErrContainerNotRunning.
func (*ContainerRunnerService) WaitStatus ¶ added in v0.16.0
func (s *ContainerRunnerService) WaitStatus(inst *types.Container, status string) error
type ContainerService ¶
type ContainerService struct {
// contains filtered or unexported fields
}
func (*ContainerService) CheckForUpdates ¶
func (*ContainerService) Delete ¶
func (s *ContainerService) Delete(inst *types.Container) error
Delete deletes a container by its UUID. If the container is still running, it returns ErrContainerStillRunning.
func (*ContainerService) DeleteAll ¶
func (s *ContainerService) DeleteAll()
func (*ContainerService) GetAll ¶
func (s *ContainerService) GetAll() map[uuid.UUID]*types.Container
func (*ContainerService) GetTags ¶
func (s *ContainerService) GetTags() []string
func (*ContainerService) GetUUID ¶
func (s *ContainerService) GetUUID() uuid.UUID
func (*ContainerService) LoadAll ¶
func (s *ContainerService) LoadAll()
func (*ContainerService) Search ¶
func (s *ContainerService) Search(query types.ContainerSearchQuery) map[uuid.UUID]*types.Container
Search returns all containers that match the query.
func (*ContainerService) SetDatabases ¶
func (s *ContainerService) SetDatabases(inst *types.Container, databases map[string]uuid.UUID, options map[string]*types.SetDatabasesOptions) error
func (*ContainerService) StartAll ¶
func (s *ContainerService) StartAll()
func (*ContainerService) StopAll ¶
func (s *ContainerService) StopAll()
type ContainerServiceParams ¶
type ContainerServiceParams struct { Ctx *app.Context ContainerAdapter port.ContainerAdapter ContainerRunnerService port.ContainerRunnerService ContainerServiceService port.ContainerServiceService ContainerEnvService port.ContainerEnvService ContainerSettingsService port.ContainerSettingsService ServiceService port.ServiceService }
type ContainerServiceService ¶
type ContainerServiceService struct {
// contains filtered or unexported fields
}
func (*ContainerServiceService) CheckForUpdate ¶
CheckForUpdate checks if the service of a container has an update. If it has, it sets the container's ServiceUpdate field.
type ContainerSettingsService ¶
type ContainerSettingsService struct {
// contains filtered or unexported fields
}
func NewContainerSettingsService ¶
func NewContainerSettingsService(adapter port.ContainerSettingsAdapter) *ContainerSettingsService
func (*ContainerSettingsService) Load ¶
func (s *ContainerSettingsService) Load(inst *types.Container) error
func (*ContainerSettingsService) Save ¶
func (s *ContainerSettingsService) Save(inst *types.Container, settings types.ContainerSettings) error
func (*ContainerSettingsService) SetDatabases ¶
func (*ContainerSettingsService) SetDisplayName ¶
func (s *ContainerSettingsService) SetDisplayName(inst *types.Container, value string) error
func (*ContainerSettingsService) SetLaunchOnStartup ¶
func (s *ContainerSettingsService) SetLaunchOnStartup(inst *types.Container, value bool) error
func (*ContainerSettingsService) SetTags ¶
func (s *ContainerSettingsService) SetTags(inst *types.Container, tags []string) error
func (*ContainerSettingsService) SetVersion ¶
func (s *ContainerSettingsService) SetVersion(inst *types.Container, value string) error
type DockerKernelService ¶
type DockerKernelService struct {
// contains filtered or unexported fields
}
func (DockerKernelService) BuildImage ¶
func (s DockerKernelService) BuildImage(options types.BuildImageOptions) (dockertypes.ImageBuildResponse, error)
func (DockerKernelService) CreateContainer ¶
func (s DockerKernelService) CreateContainer(options types.CreateContainerOptions) (types.CreateContainerResponse, error)
func (DockerKernelService) DeleteContainer ¶
func (s DockerKernelService) DeleteContainer(id string) error
func (DockerKernelService) DeleteMounts ¶ added in v0.15.0
func (s DockerKernelService) DeleteMounts(uuid string) error
func (DockerKernelService) InfoContainer ¶
func (s DockerKernelService) InfoContainer(id string) (types.InfoContainerResponse, error)
func (DockerKernelService) InfoImage ¶
func (s DockerKernelService) InfoImage(id string) (types.InfoImageResponse, error)
func (DockerKernelService) ListContainers ¶
func (s DockerKernelService) ListContainers() ([]types.DockerContainer, error)
func (DockerKernelService) LogsStderrContainer ¶
func (s DockerKernelService) LogsStderrContainer(id string) (io.ReadCloser, error)
func (DockerKernelService) LogsStdoutContainer ¶
func (s DockerKernelService) LogsStdoutContainer(id string) (io.ReadCloser, error)
func (DockerKernelService) PullImage ¶
func (s DockerKernelService) PullImage(options types.PullImageOptions) (io.ReadCloser, error)
func (DockerKernelService) StartContainer ¶
func (s DockerKernelService) StartContainer(id string) error
func (DockerKernelService) StopContainer ¶
func (s DockerKernelService) StopContainer(id string) error
func (DockerKernelService) WaitContainer ¶
func (s DockerKernelService) WaitContainer(id string, cond types.WaitContainerCondition) error
type MetricsService ¶
type MetricsService struct {
// contains filtered or unexported fields
}
func (*MetricsService) GetUUID ¶
func (s *MetricsService) GetUUID() uuid.UUID
type ServiceService ¶
type ServiceService struct {
// contains filtered or unexported fields
}
func NewServiceService ¶
func NewServiceService() *ServiceService
func (*ServiceService) GetAll ¶
func (s *ServiceService) GetAll() []types.Service
func (*ServiceService) GetUUID ¶
func (s *ServiceService) GetUUID() uuid.UUID
Click to show internal directories.
Click to hide internal directories.