Maint: interface composition for HTTP proxy loop

- Change SetStatus to ApplyStatus
- Add Runner interface
- Add SettingsGetterSetter alias to state.SettingsGetterSetter
This commit is contained in:
Quentin McGaw (laptop)
2021-07-24 18:50:17 +00:00
parent 7479974d79
commit 85540d96b6
4 changed files with 12 additions and 8 deletions

View File

@@ -14,13 +14,10 @@ import (
)
type Looper interface {
Run(ctx context.Context, done chan<- struct{})
SetStatus(ctx context.Context, status models.LoopStatus) (
outcome string, err error)
GetStatus() (status models.LoopStatus)
GetSettings() (settings configuration.HTTPProxy)
SetSettings(ctx context.Context, settings configuration.HTTPProxy) (
outcome string)
Runner
loopstate.Getter
loopstate.Applier
SettingsGetterSetter
}
type looper struct {