usecases

package
v0.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// SpawnProcessLimit is the number of processes concurrently executing terraform.
	SpawnProcessLimit = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster interface {
	// Build builds the cluster.
	Build(logger zerolog.Logger) error
	// Destroy destroys the cluster.
	Destroy(logger zerolog.Logger) error
	// Id returns a cluster ID for the cluster.
	Id() string
	// UpdateCurrentState sets the current state equal to the desired state.
	UpdateCurrentState()
}

type Usecases

type Usecases struct {
	// DynamoDB connector.
	DynamoDB ports.DynamoDBPort
	// Minio connector.
	StateStorage ports.StateStoragePort
	// SpawnProcessLimit represents a synchronization channel which limits the number of spawned terraform
	// processes. This values should always be non-nil and be buffered, where the capacity indicates
	// the limit.
	SpawnProcessLimit chan struct{}
}

func (*Usecases) BuildInfrastructure

func (u *Usecases) BuildInfrastructure(request *pb.BuildInfrastructureRequest) (*pb.BuildInfrastructureResponse, error)

BuildInfrastructure builds the required infrastructure for a single Kubernetes cluster and the Loadbalancer clusters related to it

func (*Usecases) DestroyInfrastructure

func (u *Usecases) DestroyInfrastructure(ctx context.Context, request *pb.DestroyInfrastructureRequest) (*pb.DestroyInfrastructureResponse, error)

DestroyInfrastructure destroys the infrastructure for provided LB clusters and a Kubernetes cluster (if provided).

Jump to

Keyboard shortcuts

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