task

package
v0.0.0-...-fb356ce Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManifestsAreTheSame

func ManifestsAreTheSame(generateManifest, oldManifest []byte) (bool, error)

func NewManifestGenerator

func NewManifestGenerator(
	serviceAdapter ServiceAdapterClient,
	serviceOffering config.ServiceOffering,
	serviceStemcells []serviceadapter.Stemcell,
	serviceReleases serviceadapter.ServiceReleases,
) manifestGenerator

Types

type BoshClient

type BoshClient interface {
	Deploy(manifest []byte, contextID string, logger *log.Logger, reporter *boshdirector.AsyncTaskReporter) (int, error)
	Recreate(deploymentName, contextID string, logger *log.Logger, taskReporter *boshdirector.AsyncTaskReporter) (int, error)
	GetTasksInProgress(deploymentName string, logger *log.Logger) (boshdirector.BoshTasks, error)
	GetTask(taskID int, logger *log.Logger) (boshdirector.BoshTask, error)
	GetNormalisedTasksByContext(deploymentName, contextID string, logger *log.Logger) (boshdirector.BoshTasks, error)
	GetDeployment(name string, logger *log.Logger) ([]byte, bool, error)
	GetConfigs(configName string, logger *log.Logger) ([]boshdirector.BoshConfig, error)
	UpdateConfig(configType, configName string, configContent []byte, logger *log.Logger) error
	GetEvents(deploymentName string, eventType string, logger *log.Logger) ([]boshdirector.BoshEvent, error)
}

type BulkSetter

type BulkSetter interface {
	BulkSet([]broker.ManifestSecret) error
}

type Deployer

type Deployer struct {
	DisableBoshConfigs bool
	// contains filtered or unexported fields
}

func NewDeployer

func NewDeployer(boshClient BoshClient, manifestGenerator ManifestGenerator, odbSecrets ODBSecrets, bulkSetter BulkSetter) Deployer

func (Deployer) Create

func (d Deployer) Create(
	deploymentName string,
	planID string,
	requestParams map[string]interface{},
	boshContextID string,
	uaaClientObject map[string]string,
	logger *log.Logger,
) (int, []byte, error)

func (Deployer) Recreate

func (d Deployer) Recreate(
	deploymentName,
	planID,
	boshContextID string,
	logger *log.Logger,
) (int, error)

func (Deployer) Update

func (d Deployer) Update(
	deploymentName,
	planID string,
	requestParams map[string]interface{},
	previousPlanID *string,
	boshContextID string,
	oldSecretsMap map[string]string,
	uaaClientObject map[string]string,
	logger *log.Logger,
) (int, []byte, error)

func (Deployer) Upgrade

func (d Deployer) Upgrade(
	deploymentName string,
	plan config.Plan,
	requestParams map[string]interface{},
	boshContextID string,
	uaaClientObject map[string]string,
	logger *log.Logger,
) (int, []byte, error)

type GenerateManifestProperties

type GenerateManifestProperties struct {
	DeploymentName  string
	PlanID          string
	RequestParams   map[string]interface{}
	OldManifest     []byte
	PreviousPlanID  *string
	SecretsMap      map[string]string
	PreviousConfigs map[string]string
	UAAClient       map[string]string
}

type ManifestGenerator

type ManifestGenerator interface {
	GenerateManifest(
		generateManifestProperties GenerateManifestProperties,
		logger *log.Logger,
	) (serviceadapter.MarshalledGenerateManifest, error)
}

type ODBSecrets

type ODBSecrets interface {
	GenerateSecretPaths(deploymentName, manifest string, secretsMap serviceadapter.ODBManagedSecrets) []broker.ManifestSecret
	ReplaceODBRefs(manifest string, secrets []broker.ManifestSecret) string
}

type RawBoshManifest

type RawBoshManifest []byte

type ServiceAdapterClient

type ServiceAdapterClient interface {
	GenerateManifest(
		serviceReleases serviceadapter.ServiceDeployment,
		plan serviceadapter.Plan,
		requestParams map[string]interface{},
		previousManifest []byte,
		previousPlan *serviceadapter.Plan,
		oldSecretsMap map[string]string,
		previousConfigs map[string]string,
		uaaClient map[string]string,
		logger *log.Logger,
	) (serviceadapter.MarshalledGenerateManifest, error)
	GeneratePlanSchema(plan serviceadapter.Plan, logger *log.Logger) (domain.ServiceSchemas, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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