-
Notifications
You must be signed in to change notification settings - Fork 0
/
mediator.go
36 lines (33 loc) · 1.04 KB
/
mediator.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package background
import "github.com/wufe/polo/pkg/background/queues"
type Mediator struct {
BuildSession queues.SessionBuildQueue
DestroySession queues.SessionDestroyQueue
SessionFileSystem queues.SessionFilesystemQueue
CleanSession queues.SessionCleanupQueue
StartSession queues.SessionStartQueue
HealthcheckSession queues.SessionHealthcheckQueue
ApplicationInit queues.ApplicationInitQueue
ApplicationFetch queues.ApplicationFetchQueue
}
func NewMediator(
build queues.SessionBuildQueue,
destroy queues.SessionDestroyQueue,
fs queues.SessionFilesystemQueue,
clean queues.SessionCleanupQueue,
start queues.SessionStartQueue,
healthcheck queues.SessionHealthcheckQueue,
init queues.ApplicationInitQueue,
fetch queues.ApplicationFetchQueue,
) *Mediator {
return &Mediator{
BuildSession: build,
DestroySession: destroy,
SessionFileSystem: fs,
CleanSession: clean,
StartSession: start,
HealthcheckSession: healthcheck,
ApplicationInit: init,
ApplicationFetch: fetch,
}
}