infrastructure

package
v0.0.0-...-4c964c4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

WireSet provides a wire set for this package.

Functions

This section is empty.

Types

type Config

type Config struct {
	AgentPort int
}

type InfraProvisioner

type InfraProvisioner interface {
	// TriggerProvision triggers the provisionining of infra resources using the infraProviderResource with different
	// infra providers.
	TriggerProvision(
		ctx context.Context,
		gitspaceConfig types.GitspaceConfig,
		requiredGitspacePorts []types.GitspacePort,
	) error

	// ResumeProvision stores the provisioned infra details in the db depending on the provisioning type.
	ResumeProvision(
		ctx context.Context,
		gitspaceConfig types.GitspaceConfig,
		provisionedInfra types.Infrastructure,
	) error

	// TriggerStop triggers deprovisioning of those resources which can be stopped without losing the Gitspace data.
	TriggerStop(
		ctx context.Context,
		infraProviderResource types.InfraProviderResource,
		infra types.Infrastructure,
	) error

	// ResumeStop stores the deprovisioned infra details in the db depending on the provisioning type.
	ResumeStop(
		ctx context.Context,
		gitspaceConfig types.GitspaceConfig,
		deprovisionedInfra types.Infrastructure,
	) error

	// TriggerDeprovision triggers deprovisionign of all the resources created for the Gitspace.
	TriggerDeprovision(
		ctx context.Context,
		gitspaceConfig types.GitspaceConfig,
		infra types.Infrastructure,
	) error

	// ResumeDeprovision stores the deprovisioned infra details in the db depending on the provisioning type.
	ResumeDeprovision(
		ctx context.Context,
		gitspaceConfig types.GitspaceConfig,
		deprovisionedInfra types.Infrastructure,
	) error

	// Find finds the provisioned infra resources for the gitspace instance.
	Find(
		ctx context.Context,
		gitspaceConfig types.GitspaceConfig,
		requiredGitspacePorts []types.GitspacePort,
	) (*types.Infrastructure, error)
}

func NewInfraProvisionerService

func NewInfraProvisionerService(
	infraProviderConfigStore store.InfraProviderConfigStore,
	infraProviderResourceStore store.InfraProviderResourceStore,
	providerFactory infraprovider.Factory,
	infraProviderTemplateStore store.InfraProviderTemplateStore,
	infraProvisionedStore store.InfraProvisionedStore,
	config *Config,
) InfraProvisioner

func ProvideInfraProvisionerService

func ProvideInfraProvisionerService(
	infraProviderConfig store.InfraProviderConfigStore,
	infraProviderResource store.InfraProviderResourceStore,
	providerFactory infraprovider.Factory,
	infraProviderTemplateStore store.InfraProviderTemplateStore,
	infraProvisionedStore store.InfraProvisionedStore,
	config *Config,
) InfraProvisioner

Jump to

Keyboard shortcuts

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