Documentation ¶
Index ¶
- func DeploymentStatePath(deploymentManifestPath string) string
- func LegacyDeploymentStatePath(deploymentManifestPath string) string
- type DeploymentRepo
- type DeploymentState
- type DeploymentStateService
- type DiskRecord
- type DiskRepo
- type LegacyDeploymentStateMigrator
- type ReleaseRecord
- type ReleaseRepo
- type StemcellRecord
- type StemcellRepo
- type VMRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeploymentStatePath ¶
Types ¶
type DeploymentRepo ¶
type DeploymentRepo interface { UpdateCurrent(manifestSHA string) error FindCurrent() (manifestSHA string, found bool, err error) }
func NewDeploymentRepo ¶
func NewDeploymentRepo(deploymentStateService DeploymentStateService) DeploymentRepo
type DeploymentState ¶
type DeploymentState struct { DirectorID string `json:"director_id"` InstallationID string `json:"installation_id"` CurrentVMCID string `json:"current_vm_cid"` CurrentStemcellID string `json:"current_stemcell_id"` CurrentDiskID string `json:"current_disk_id"` CurrentReleaseIDs []string `json:"current_release_ids"` CurrentManifestSHA string `json:"current_manifest_sha"` Disks []DiskRecord `json:"disks"` Stemcells []StemcellRecord `json:"stemcells"` Releases []ReleaseRecord `json:"releases"` }
type DeploymentStateService ¶
type DeploymentStateService interface { Path() string Exists() bool Load() (DeploymentState, error) Save(DeploymentState) error Cleanup() error }
func NewFileSystemDeploymentStateService ¶
func NewFileSystemDeploymentStateService(fs boshsys.FileSystem, uuidGenerator boshuuid.Generator, logger boshlog.Logger, deploymentStatePath string) DeploymentStateService
type DiskRecord ¶
type DiskRecord struct { ID string `json:"id"` CID string `json:"cid"` Size int `json:"size"` CloudProperties biproperty.Map `json:"cloud_properties"` }
type DiskRepo ¶
type DiskRepo interface { UpdateCurrent(diskID string) error FindCurrent() (DiskRecord, bool, error) ClearCurrent() error Save(cid string, size int, cloudProperties biproperty.Map) (DiskRecord, error) Find(cid string) (DiskRecord, bool, error) All() ([]DiskRecord, error) Delete(DiskRecord) error }
func NewDiskRepo ¶
func NewDiskRepo(deploymentStateService DeploymentStateService, uuidGenerator boshuuid.Generator) DiskRepo
type LegacyDeploymentStateMigrator ¶
type LegacyDeploymentStateMigrator interface {
MigrateIfExists(configPath string) (migrated bool, err error)
}
func NewLegacyDeploymentStateMigrator ¶
func NewLegacyDeploymentStateMigrator( deploymentStateService DeploymentStateService, fs boshsys.FileSystem, uuidGenerator boshuuid.Generator, logger boshlog.Logger, ) LegacyDeploymentStateMigrator
type ReleaseRecord ¶
type ReleaseRepo ¶
type ReleaseRepo interface { List() ([]ReleaseRecord, error) Update([]release.Release) error }
ReleaseRepo persists releases metadata
func NewReleaseRepo ¶
func NewReleaseRepo(deploymentStateService DeploymentStateService, uuidGenerator boshuuid.Generator) ReleaseRepo
type StemcellRecord ¶
type StemcellRepo ¶
type StemcellRepo interface { UpdateCurrent(recordID string) error FindCurrent() (StemcellRecord, bool, error) ClearCurrent() error Save(name, version, cid string) (StemcellRecord, error) Find(name, version string) (StemcellRecord, bool, error) All() ([]StemcellRecord, error) Delete(StemcellRecord) error }
func NewStemcellRepo ¶
func NewStemcellRepo(deploymentStateService DeploymentStateService, uuidGenerator boshuuid.Generator) StemcellRepo
Source Files ¶
Click to show internal directories.
Click to hide internal directories.