component/snapshots: Create new component

This commit creates a new 'snapshots' component that is intended to
manage snapshots and backups.
This commit is contained in:
Tom Wiesing 2022-10-01 19:39:41 +02:00
parent ea56ff4aac
commit f58920baf4
No known key found for this signature in database
7 changed files with 89 additions and 63 deletions

View file

@ -6,6 +6,7 @@ import (
"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"
@ -29,6 +30,7 @@ type components struct {
// other components
instances lazy.Lazy[*instances.Instances]
snapshots lazy.Lazy[*snapshots.Snapshots]
}
//
@ -73,6 +75,12 @@ func (dis *Distillery) Instances() *instances.Instances {
})
}
func (dis *Distillery) Snapshots() *snapshots.Snapshots {
return component.Initialize(dis.Core, &dis.components.snapshots, func(snapshots *snapshots.Snapshots) {
})
}
//
// ALL COMPONENTS
//