Move status into a seperate package
This commit is contained in:
parent
4752c0fcec
commit
3fada6ad38
23 changed files with 220 additions and 197 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/meta"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/status"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/locker"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/mstore"
|
||||
|
|
@ -69,7 +70,7 @@ type LastRebuildFetcher struct {
|
|||
Barrel *Barrel
|
||||
}
|
||||
|
||||
func (lbr *LastRebuildFetcher) Fetch(flags ingredient.FetchFlags, info *ingredient.Information) (err error) {
|
||||
func (lbr *LastRebuildFetcher) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
|
||||
info.LastRebuild, _ = lbr.Barrel.LastRebuild()
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/phpx"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/status"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient"
|
||||
"github.com/tkw1536/goprogram/exit"
|
||||
"github.com/tkw1536/goprogram/stream"
|
||||
|
|
@ -43,7 +44,7 @@ type LastCronFetcher struct {
|
|||
Drush *Drush
|
||||
}
|
||||
|
||||
func (lbr *LastCronFetcher) Fetch(flags ingredient.FetchFlags, info *ingredient.Information) (err error) {
|
||||
func (lbr *LastCronFetcher) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
|
||||
if flags.Quick {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/meta"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/status"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/mstore"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/environment"
|
||||
|
|
@ -54,7 +55,7 @@ type LastUpdateFetcher struct {
|
|||
Drush *Drush
|
||||
}
|
||||
|
||||
func (lbr *LastUpdateFetcher) Fetch(flags ingredient.FetchFlags, info *ingredient.Information) (err error) {
|
||||
func (lbr *LastUpdateFetcher) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
|
||||
info.LastUpdate, err = lbr.Drush.LastUpdate()
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package barrel
|
||||
|
||||
import (
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/status"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient"
|
||||
"github.com/tkw1536/goprogram/stream"
|
||||
)
|
||||
|
|
@ -20,7 +21,7 @@ type RunningFetcher struct {
|
|||
Barrel *Barrel
|
||||
}
|
||||
|
||||
func (rf *RunningFetcher) Fetch(flags ingredient.FetchFlags, info *ingredient.Information) (err error) {
|
||||
func (rf *RunningFetcher) Fetch(flags ingredient.FetcherFlags, info *status.Information) (err error) {
|
||||
info.Running, err = rf.Barrel.Running()
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package ssh
|
|||
import (
|
||||
"io"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/status"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/barrel"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/environment"
|
||||
|
|
@ -32,7 +33,7 @@ func (ssh *SSH) Keys() ([]ssh.PublicKey, error) {
|
|||
return sshx.ParseAllKeys(bytes), nil
|
||||
}
|
||||
|
||||
func (sshx *SSH) Fetch(flags ingredient.FetchFlags, info *ingredient.Information) error {
|
||||
func (sshx *SSH) Fetch(flags ingredient.FetcherFlags, info *status.Information) error {
|
||||
if flags.Quick {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue