config

package
v2.0.4+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeploymentStatePath

func DeploymentStatePath(deploymentManifestPath string, deploymentStatePath string) string

func LegacyDeploymentStatePath

func LegacyDeploymentStatePath(deploymentManifestPath string) string

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 ReleaseRecord struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Version string `json:"version"`
}

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 StemcellRecord struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Version string `json:"version"`
	CID     string `json:"cid"`
}

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

type VMRepo

type VMRepo interface {
	FindCurrent() (cid string, found bool, err error)
	UpdateCurrent(cid string) error
	ClearCurrent() error
}

func NewVMRepo

func NewVMRepo(deploymentStateService DeploymentStateService) VMRepo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL