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:
parent
ea56ff4aac
commit
f58920baf4
7 changed files with 89 additions and 63 deletions
|
|
@ -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
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue