forked from cloudfoundry-attic/bosh-init
-
Notifications
You must be signed in to change notification settings - Fork 0
/
state.go
31 lines (25 loc) · 810 Bytes
/
state.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
package state
import (
biinstalljob "github.com/cloudfoundry/bosh-init/installation/job"
biinstallpkg "github.com/cloudfoundry/bosh-init/installation/pkg"
)
type State interface {
RenderedCPIJob() biinstalljob.RenderedJobRef
CompiledPackages() []biinstallpkg.CompiledPackageRef
}
type state struct {
renderedCPIJob biinstalljob.RenderedJobRef
compiledPackages []biinstallpkg.CompiledPackageRef
}
func NewState(renderedCPIJob biinstalljob.RenderedJobRef, compiledPackages []biinstallpkg.CompiledPackageRef) State {
return state{
renderedCPIJob: renderedCPIJob,
compiledPackages: compiledPackages,
}
}
func (s state) RenderedCPIJob() biinstalljob.RenderedJobRef {
return s.renderedCPIJob
}
func (s state) CompiledPackages() []biinstallpkg.CompiledPackageRef {
return s.compiledPackages
}