controller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func (*Controller) AbortRelease

func (c *Controller) AbortRelease(ctx context.Context, blockName, releaseId, envId string) *utilsGoServer.Error

func (*Controller) CheckCertificateReadiness

func (c *Controller) CheckCertificateReadiness(blockName, envId string) bool

func (*Controller) CreateBlock

func (c *Controller) CreateBlock(
	envId, name string,
	buildConfig *types.BuildConfig,
	runConfig *types.RunConfig) (string, string, *utilsGoServer.Error)

func (*Controller) CreateCustomDomainName

func (c *Controller) CreateCustomDomainName(
	blockName, envId, domainName string, protocol types.RunConfig_Protocol) *utilsGoServer.Error

func (*Controller) CreateEnvironment

func (c *Controller) CreateEnvironment(name string) (*types.Environment, *utilsGoServer.Error)

func (*Controller) DeleteBlock

func (c *Controller) DeleteBlock(name, envId string) *utilsGoServer.Error

func (*Controller) DeleteCustomDomainName

func (c *Controller) DeleteCustomDomainName(
	blockName, envId, domainName string, protocol types.RunConfig_Protocol) *utilsGoServer.Error

func (*Controller) DeleteEnvironment

func (c *Controller) DeleteEnvironment(id string) *utilsGoServer.Error

func (*Controller) DeployBlockUpdate

func (c *Controller) DeployBlockUpdate(
	name, envId, baseReleaseId string,
	buildConfig *types.BuildConfig,
	runConfig *types.RunConfig) (string, string, *utilsGoServer.Error)

func (*Controller) DisableExternalURL

func (c *Controller) DisableExternalURL(name, envId string) *utilsGoServer.Error

func (*Controller) EnableExternalURL

func (c *Controller) EnableExternalURL(name, envId, releaseId string) *utilsGoServer.Error

func (*Controller) GenReleaseConfigFromKintoFile

func (c *Controller) GenReleaseConfigFromKintoFile(
	org, repo, branch, envId, githubUserToken string, blockType types.Block_Type) (*types.ReleaseConfig, *utilsGoServer.Error)

func (*Controller) GetBlock

func (c *Controller) GetBlock(name, envId string) (*types.Block, *utilsGoServer.Error)

func (*Controller) GetBlocks

func (c *Controller) GetBlocks(envId string) (*types.Blocks, *utilsGoServer.Error)

func (*Controller) GetBlocksHealthStatus

func (c *Controller) GetBlocksHealthStatus(envId string) (*types.BlockStatuses, *utilsGoServer.Error)

func (*Controller) GetBlocksMetrics

func (c *Controller) GetBlocksMetrics(name, envId string) (*types.BlocksMetrics, *utilsGoServer.Error)

func (*Controller) GetEnvironment

func (c *Controller) GetEnvironment(id string) (*types.Environment, *utilsGoServer.Error)

func (*Controller) GetEnvironments

func (c *Controller) GetEnvironments() (*types.Environments, *utilsGoServer.Error)

func (Controller) GetKintoConfiguration

func (Controller) GetKintoConfiguration() (*types.KintoConfiguration, error)

func (*Controller) KillBlockInstance

func (c *Controller) KillBlockInstance(id, envId string) *utilsGoServer.Error

func (*Controller) PromoteRelease

func (c *Controller) PromoteRelease(tag, releaseId, blockName, envId, targetEnvId string) *utilsGoServer.Error

func (*Controller) RollbackBlock

func (c *Controller) RollbackBlock(name, envId, releaseId string) (string, string, *utilsGoServer.Error)

func (*Controller) StartTeleport

func (c *Controller) StartTeleport(
	ctx context.Context, envId, blockNameToTeleport string) (*types.TeleportServiceData, *utilsGoServer.Error)

func (*Controller) StopTeleport

func (c *Controller) StopTeleport(envId, blockNameTeleported string) *utilsGoServer.Error

func (*Controller) SuspendBlock

func (c *Controller) SuspendBlock(name, envId string) (string, string, *utilsGoServer.Error)

func (*Controller) TagRelease

func (c *Controller) TagRelease(tag, blockName, envId, releaseId string) *utilsGoServer.Error

func (*Controller) TriggerDeploy

func (c *Controller) TriggerDeploy(
	name, envId string) (string, string, *utilsGoServer.Error)

func (*Controller) UpdateBuildCommitSha

func (c *Controller) UpdateBuildCommitSha(releaseId, blockName, envId, commitSha string) *utilsGoServer.Error

func (*Controller) UpdateBuildStatus

func (c *Controller) UpdateBuildStatus(releaseId, blockName, envId string,
	buildState types.BuildStatus_State) (*types.Release, *utilsGoServer.Error)

func (*Controller) UpdateEnvironment

func (c *Controller) UpdateEnvironment(id, name string) (*types.Environment, *utilsGoServer.Error)

func (*Controller) WatchBuildLogs

func (c *Controller) WatchBuildLogs(releaseId, blockName, envId string, ctx context.Context,
	logsChan chan *types.Logs) *utilsGoServer.Error

func (*Controller) WatchConsoleLogs

func (c *Controller) WatchConsoleLogs(blockName, envId string, context context.Context,
	logsChan chan *types.ConsoleLog) *utilsGoServer.Error

func (*Controller) WatchJobsStatus

func (c *Controller) WatchJobsStatus(
	blockName, envId string,
	ctx context.Context,
	sendClientLogs func(jobStatus *types.JobStatus) error) *utilsGoServer.Error

func (*Controller) WatchReleasesStatus

func (c *Controller) WatchReleasesStatus(blockName, envId string, ctx context.Context,
	logsChan chan *types.ReleasesStatus) *utilsGoServer.Error

type ControllerInterface

type ControllerInterface interface {
	GetEnvironment(id string) (*types.Environment, *utilsGoServer.Error)
	GetEnvironments() (*types.Environments, *utilsGoServer.Error)
	CreateEnvironment(name string) (*types.Environment, *utilsGoServer.Error)
	UpdateEnvironment(id string, name string) (*types.Environment, *utilsGoServer.Error)
	DeleteEnvironment(id string) *utilsGoServer.Error

	CreateBlock(
		envId, name string,
		buildConfig *types.BuildConfig,
		runConfig *types.RunConfig) (string, string, *utilsGoServer.Error)
	GetBlock(name, envId string) (*types.Block, *utilsGoServer.Error)
	GetBlocks(envId string) (*types.Blocks, *utilsGoServer.Error)
	DeployBlockUpdate(
		name, envId, baseReleaseId string,
		buildConfig *types.BuildConfig,
		runConfig *types.RunConfig) (string, string, *utilsGoServer.Error)
	TriggerDeploy(
		name, envId string) (string, string, *utilsGoServer.Error)
	RollbackBlock(name, envId, releaseId string) (string, string, *utilsGoServer.Error)
	DeleteBlock(name, envId string) *utilsGoServer.Error
	WatchReleasesStatus(blockName, envId string, ctx context.Context, statusChan chan *types.ReleasesStatus) *utilsGoServer.Error
	GetBlocksHealthStatus(envId string) (*types.BlockStatuses, *utilsGoServer.Error)
	WatchJobsStatus(
		blockName, envId string, ctx context.Context, sendClientLogs func(jobStatus *types.JobStatus) error) *utilsGoServer.Error
	GetBlocksMetrics(name, envId string) (*types.BlocksMetrics, *utilsGoServer.Error)
	KillBlockInstance(id, envId string) *utilsGoServer.Error
	// Scale down all the resources of a block down to 0
	// return blockName, releaseId, error if any
	SuspendBlock(blockName, envId string) (string, string, *utilsGoServer.Error)

	WatchBuildLogs(releaseId, blockName, envId string, ctx context.Context, logsChan chan *types.Logs) *utilsGoServer.Error
	UpdateBuildStatus(releaseId, blockName, envId string, buildState types.BuildStatus_State) (*types.Release, *utilsGoServer.Error)
	UpdateBuildCommitSha(releaseId, blockName, envId, commitSha string) *utilsGoServer.Error

	WatchConsoleLogs(blockName, envId string, ctx context.Context, logsChan chan *types.ConsoleLog) *utilsGoServer.Error

	GetKintoConfiguration() (*types.KintoConfiguration, error)

	AbortRelease(ctx context.Context, blockName, releaseId, envId string) *utilsGoServer.Error

	EnableExternalURL(name, envId, releaseId string) *utilsGoServer.Error
	DisableExternalURL(name, envId string) *utilsGoServer.Error

	CreateCustomDomainName(blockName, envId, domainName string, protocol types.RunConfig_Protocol) *utilsGoServer.Error
	DeleteCustomDomainName(blockName, envId, domainName string, protocol types.RunConfig_Protocol) *utilsGoServer.Error
	CheckCertificateReadiness(blockName, envId string) bool

	StartTeleport(
		ctx context.Context, envId, blockNameToTeleport string) (*types.TeleportServiceData, *utilsGoServer.Error)
	StopTeleport(envId, blockNameTeleported string) *utilsGoServer.Error

	TagRelease(tag, blockName, envId, releaseId string) *utilsGoServer.Error
	PromoteRelease(tag, releaseId, blockName, envId, targetEnvId string) *utilsGoServer.Error

	GenReleaseConfigFromKintoFile(
		org, repo, branch, envId, githubUserToken string, blockType types.Block_Type) (*types.ReleaseConfig, *utilsGoServer.Error)
}

func NewController

func NewController(
	kubeStore store.StoreInterface, buildClient build.BuildInterface) ControllerInterface

Jump to

Keyboard shortcuts

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