internal/component: Cleanup unused general code
This commit is contained in:
parent
a5d9b1a386
commit
84974dd712
12 changed files with 127 additions and 92 deletions
|
|
@ -9,6 +9,10 @@ import (
|
|||
type Installable interface {
|
||||
Component
|
||||
|
||||
// Path returns the path this component is installed at.
|
||||
// By convention it is /var/www/deploy/internal/core/${Name()}
|
||||
Path() string
|
||||
|
||||
// Stack can be used to gain access to the "docker compose" stack.
|
||||
//
|
||||
// This should internally call [ComponentBase.MakeStack]
|
||||
|
|
@ -19,6 +23,13 @@ type Installable interface {
|
|||
Context(parent InstallationContext) InstallationContext
|
||||
}
|
||||
|
||||
// MakeStack registers the Installable as a stack
|
||||
func MakeStack(component Installable, env environment.Environment, stack StackWithResources) StackWithResources {
|
||||
stack.Env = env
|
||||
stack.Dir = component.Path()
|
||||
return stack
|
||||
}
|
||||
|
||||
// Updatable represents a component with an Update method.
|
||||
type Updatable interface {
|
||||
Component
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue