snapshots: Handle as separate components

This commit is contained in:
Tom Wiesing 2022-10-02 18:17:47 +02:00
parent 698f04e13e
commit 3b112f1b8e
No known key found for this signature in database
27 changed files with 960 additions and 789 deletions

View file

@ -4,6 +4,12 @@ import (
"context"
"github.com/FAU-CDI/wisski-distillery/internal/component"
"github.com/FAU-CDI/wisski-distillery/internal/component/control"
"github.com/FAU-CDI/wisski-distillery/internal/component/instances"
"github.com/FAU-CDI/wisski-distillery/internal/component/snapshots"
"github.com/FAU-CDI/wisski-distillery/internal/component/sql"
"github.com/FAU-CDI/wisski-distillery/internal/component/ssh"
"github.com/FAU-CDI/wisski-distillery/internal/component/triplestore"
)
// Distillery represents a WissKI Distillery
@ -34,3 +40,33 @@ type Upstream struct {
func (dis *Distillery) Context() context.Context {
return context.Background()
}
//
// PUBLIC COMPONENT GETTERS
//
func (dis *Distillery) Control() *control.Control {
return dis.cControl(dis.thread())
}
func (dis *Distillery) SSH() *ssh.SSH {
return dis.cSSH(dis.thread())
}
func (dis *Distillery) SQL() *sql.SQL {
return dis.cSQL(dis.thread())
}
func (dis *Distillery) Triplestore() *triplestore.Triplestore {
return dis.cTriplestore(dis.thread())
}
func (dis *Distillery) Instances() *instances.Instances {
return dis.cInstances(dis.thread())
}
func (dis *Distillery) SnapshotManager() *snapshots.Manager {
return dis.cSnapshotManager(dis.thread())
}
func (dis *Distillery) Installable() []component.Installable { return dis.cInstallables(dis.thread()) }
func (dis *Distillery) Updatable() []component.Updatable { return dis.cUpdateable(dis.thread()) }
func (dis *Distillery) Provisionable() []component.Provisionable {
return dis.cProvisionable(dis.thread())
}