config

package
v0.0.0-...-34d941c Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploymentConfigService

type DeploymentConfigService interface {
	SetConfigPath(string)
	Exists() bool
	Load() (DeploymentFile, error)
	Save(DeploymentFile) error
}

func NewFileSystemDeploymentConfigService

func NewFileSystemDeploymentConfigService(fs boshsys.FileSystem, uuidGenerator boshuuid.Generator, logger boshlog.Logger) DeploymentConfigService

type DeploymentFile

type DeploymentFile 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"`
	CurrentManifestSHA1 string           `json:"current_manifest_sha1"`
	Disks               []DiskRecord     `json:"disks"`
	Stemcells           []StemcellRecord `json:"stemcells"`
	Releases            []ReleaseRecord  `json:"releases"`
}

type DeploymentRepo

type DeploymentRepo interface {
	UpdateCurrent(manifestSHA1 string) error
	FindCurrent() (manifestSHA1 string, found bool, err error)
}

func NewDeploymentRepo

func NewDeploymentRepo(configService DeploymentConfigService) DeploymentRepo

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(configService DeploymentConfigService, uuidGenerator boshuuid.Generator) DiskRepo

type LegacyDeploymentConfigMigrator

type LegacyDeploymentConfigMigrator interface {
	MigrateIfExists(configPath string) (migrated bool, err error)
}

func NewLegacyDeploymentConfigMigrator

func NewLegacyDeploymentConfigMigrator(
	deploymentConfigService DeploymentConfigService,
	fs boshsys.FileSystem,
	uuidGenerator boshuuid.Generator,
	logger boshlog.Logger,
) LegacyDeploymentConfigMigrator

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(configService DeploymentConfigService, 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
}

StemcellRepo persists stemcells metadata

func NewStemcellRepo

func NewStemcellRepo(configService DeploymentConfigService, uuidGenerator boshuuid.Generator) StemcellRepo

type UserConfig

type UserConfig struct {
	DeploymentManifestPath string `json:"deployment"`
}

func (UserConfig) DeploymentConfigPath

func (c UserConfig) DeploymentConfigPath() string

func (UserConfig) LegacyDeploymentConfigPath

func (c UserConfig) LegacyDeploymentConfigPath() string

type VMRepo

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

func NewVMRepo

func NewVMRepo(configService DeploymentConfigService) VMRepo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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