Class HostingManagerFactory
Provides for the creation of HostingManager implementations for a target hosting environment.
Implements
Namespace: Neon.Kube.Hosting
Assembly: Neon.Kube.dll
Syntax
public class HostingManagerFactory : IHostingManagerFactory
Constructors
HostingManagerFactory(Action)
Constructor.
Declaration
public HostingManagerFactory(Action loaderAction = null)
Parameters
Type | Name | Description |
---|---|---|
Action | loaderAction | The optional action that will initialize the static Loader property with the IHostingLoader implemention. |
Properties
Loader
INTERNAL USE ONLY: The driver providing low-level access to hosting
manager implementations. This is initialized by a call to HostingLoader.Initialize()
defined withing the Neon.Kube.Hosting assembly.
Declaration
public static IHostingLoader Loader { get; set; }
Property Value
Type | Description |
---|---|
IHostingLoader |
Methods
GetManager(HostingEnvironment)
Returns the HostingManager for an environment that can be used for validating the hosting related options.
Declaration
public HostingManager GetManager(HostingEnvironment environment)
Parameters
Type | Name | Description |
---|---|---|
HostingEnvironment | environment | The target hosting environment. |
Returns
Type | Description |
---|---|
HostingManager | The HostingManager or |
GetManager(ClusterProxy, bool, string)
Returns the HostingManager for provisioning a cluster using the default node image URI for the cluster environment.
Declaration
public HostingManager GetManager(ClusterProxy cluster, bool cloudMarketplace, string logFolder = null)
Parameters
Type | Name | Description |
---|---|---|
ClusterProxy | cluster | The cluster being managed. |
bool | cloudMarketplace |
For cloud environments, this specifies whether the cluster should be provisioned
using a VM image from the public cloud marketplace when noteOnly NEONFORGE maintainers will have permission to use the private image. |
string | logFolder |
The folder where log files are to be written, otherwise or noteSpecific hosting managers may choose to ignore this when it doesn't make sense. |
Returns
Type | Description |
---|---|
HostingManager | The HostingManager or |
Exceptions
Type | Condition |
---|---|
NeonKubeException | Thrown if the multiple managers implement support for the same hosting environment. |
GetManagerWithNodeImageFile(ClusterProxy, string, string)
Returns the HostingManager for provisioning a cluster from an already downloaded image file already downloaded.
Declaration
public HostingManager GetManagerWithNodeImageFile(ClusterProxy cluster, string nodeImagePath, string logFolder = null)
Parameters
Type | Name | Description |
---|---|---|
ClusterProxy | cluster | The cluster being managed. |
string | nodeImagePath | Specifies the path to the local node image file. |
string | logFolder | The folder where log files are to be written, otherwise or |
Returns
Type | Description |
---|---|
HostingManager | The HostingManager or |
Exceptions
Type | Condition |
---|---|
NeonKubeException | Thrown if the multiple managers implement support for the same hosting environment. |
GetManagerWithNodeImageUri(ClusterProxy, bool, string, string)
Returns the HostingManager for provisioning a cluster using a node image specified by HTTP/HTTPS URI.
Declaration
public HostingManager GetManagerWithNodeImageUri(ClusterProxy cluster, bool cloudMarketplace, string nodeImageUri, string logFolder = null)
Parameters
Type | Name | Description |
---|---|---|
ClusterProxy | cluster | The cluster being managed. |
bool | cloudMarketplace |
For cloud environments, this specifies whether the cluster should be provisioned
using a VM image from the public cloud marketplace when noteOnly NEONFORGE maintainers will have permission to use the private image. |
string | nodeImageUri | The node image URI. |
string | logFolder |
The folder where log files are to be written, otherwise or noteSpecific hosting managers may choose to ignore this when it doesn't make sense. |
Returns
Type | Description |
---|---|
HostingManager | The HostingManager or |
Exceptions
Type | Condition |
---|---|
NeonKubeException | Thrown if the multiple managers implement support for the same hosting environment. |
IsCloudEnvironment(HostingEnvironment)
Determines whether a hosting environment is hosted in the cloud.
Declaration
public bool IsCloudEnvironment(HostingEnvironment environment)
Parameters
Type | Name | Description |
---|---|---|
HostingEnvironment | environment | The target hosting environment. |
Returns
Type | Description |
---|---|
bool |
|
Validate(ClusterDefinition)
Ensures that that a cluster definition has valid hosting options.
Declaration
public void Validate(ClusterDefinition clusterDefinition)
Parameters
Type | Name | Description |
---|---|---|
ClusterDefinition | clusterDefinition | The cluster definition. |