module DeploymentRegistry

Overview

The DeploymentRegistry module is a registry for deployment classes. It allows deployment classes to register themselves with a unique identifier, and provides a factory method to create instances of these classes.

Defined in:

runway/models/base_deployment.cr

Class Method Summary

Class Method Detail

def self.create_deployment(deployment_type : String, deployment_config : DeploymentConfig, log : Log) : BaseDeployment #

Creates an instance of an deployment class based on the deployment type.

@param deployment_type [String] The unique identifier for the deployment class. @param deployment_config [DeploymentConfig] The configuration for the deployment. @return [BaseDeployment] The created deployment instance. @raise [RuntimeError] If the deployment type is unknown.


[View source]
def self.register_deployment(deployment_type : String, deployment_class : BaseDeployment.class) #

Registers a deployment class with a unique identifier.

@param deployment_type [String] The unique identifier for the deployment class. @param deployment_class [BaseDeployment.class] The deployment class to register.


[View source]