KlusterKite  0.0.0
A framework to create scalable and redundant services based on awesome Akka.Net project.
KlusterKite.NodeManager.Mock.MockResourceMigrator Class Referenceabstract

Mock resource to test system migrations More...

Inheritance diagram for KlusterKite.NodeManager.Mock.MockResourceMigrator:
KlusterKite.NodeManager.Migrator.IMigrator KlusterKite.NodeManager.Mock.MockResourceMigratorDependence KlusterKite.NodeManager.Mock.MockResourceMigratorDependent

Public Member Functions

 MockResourceMigrator (Config config)
 Initializes a new instance of the MockResourceMigrator class. More...
 
IEnumerable< string > GetAllPoints ()
 Gets all possible migration points defined in this assembly More...
 
string GetCurrentPoint (ResourceId resourceId)
 Gets the current configuration migration point for specified resource More...
 
IEnumerable< ResourceIdGetMigratableResources ()
 Gets the list of cluster resources that this migrator can migrate More...
 
IEnumerable< string > Migrate (ResourceId resourceId, string pointToMigrate)
 Performs the migration procedure More...
 

Public Attributes

string LatestPoint => this.GetAllPoints().Last()
 
decimal Priority => 1M
 

Protected Member Functions

abstract string GetResourceName (string resourceCode)
 Creates the resource name for the resource code More...
 
abstract string GetRedisKey (ResourceId resourceId)
 Gets the redis key for specified resource More...
 

Properties

abstract string Name [get]
 
abstract EnResourceDependencyType DependencyType [get]
 
abstract string ResourcePointsConfigPath [get]
 Gets the config path to the resource points More...
 
abstract string ResourcesConfigPath [get]
 Gets the config path to the resources names More...
 
- Properties inherited from KlusterKite.NodeManager.Migrator.IMigrator
string LatestPoint [get]
 Gets the latest known migration point identification for this assembly More...
 
string Name [get]
 Gets the human-readable migrator name More...
 
EnResourceDependencyType DependencyType [get]
 Gets the type of resource dependency More...
 
decimal Priority [get]
 Gets the priority of execution. In case of migration, the migrators will be run in order of priority from largest to lowest More...
 

Detailed Description

Mock resource to test system migrations

Definition at line 25 of file MockResourceMigrator.cs.

Constructor & Destructor Documentation

◆ MockResourceMigrator()

KlusterKite.NodeManager.Mock.MockResourceMigrator.MockResourceMigrator ( Config  config)

Initializes a new instance of the MockResourceMigrator class.

Parameters
configThe config.

Definition at line 43 of file MockResourceMigrator.cs.

Member Function Documentation

◆ GetAllPoints()

IEnumerable<string> KlusterKite.NodeManager.Mock.MockResourceMigrator.GetAllPoints ( )

Gets all possible migration points defined in this assembly

Implements KlusterKite.NodeManager.Migrator.IMigrator.

Definition at line 72 of file MockResourceMigrator.cs.

◆ GetCurrentPoint()

string KlusterKite.NodeManager.Mock.MockResourceMigrator.GetCurrentPoint ( ResourceId  resourceId)

Gets the current configuration migration point for specified resource

Implements KlusterKite.NodeManager.Migrator.IMigrator.

Definition at line 78 of file MockResourceMigrator.cs.

◆ GetMigratableResources()

IEnumerable<ResourceId> KlusterKite.NodeManager.Mock.MockResourceMigrator.GetMigratableResources ( )

Gets the list of cluster resources that this migrator can migrate

Implements KlusterKite.NodeManager.Migrator.IMigrator.

Definition at line 88 of file MockResourceMigrator.cs.

◆ GetRedisKey()

abstract string KlusterKite.NodeManager.Mock.MockResourceMigrator.GetRedisKey ( ResourceId  resourceId)
protectedpure virtual

Gets the redis key for specified resource

Parameters
resourceIdThe resource
Returns
the key in Redis

Implemented in KlusterKite.NodeManager.Mock.MockResourceMigratorDependent, and KlusterKite.NodeManager.Mock.MockResourceMigratorDependence.

◆ GetResourceName()

abstract string KlusterKite.NodeManager.Mock.MockResourceMigrator.GetResourceName ( string  resourceCode)
protectedpure virtual

Creates the resource name for the resource code

Parameters
resourceCodeThe resource code
Returns
The resource name

Implemented in KlusterKite.NodeManager.Mock.MockResourceMigratorDependent, and KlusterKite.NodeManager.Mock.MockResourceMigratorDependence.

◆ Migrate()

IEnumerable<string> KlusterKite.NodeManager.Mock.MockResourceMigrator.Migrate ( ResourceId  resourceId,
string  pointToMigrate 
)

Performs the migration procedure

Implements KlusterKite.NodeManager.Migrator.IMigrator.

Definition at line 95 of file MockResourceMigrator.cs.

Member Data Documentation

◆ LatestPoint

string KlusterKite.NodeManager.Mock.MockResourceMigrator.LatestPoint => this.GetAllPoints().Last()

Definition at line 50 of file MockResourceMigrator.cs.

◆ Priority

decimal KlusterKite.NodeManager.Mock.MockResourceMigrator.Priority => 1M

Definition at line 59 of file MockResourceMigrator.cs.

Property Documentation

◆ DependencyType

abstract EnResourceDependencyType KlusterKite.NodeManager.Mock.MockResourceMigrator.DependencyType
get

Definition at line 56 of file MockResourceMigrator.cs.

◆ Name

abstract string KlusterKite.NodeManager.Mock.MockResourceMigrator.Name
get

Definition at line 53 of file MockResourceMigrator.cs.

◆ ResourcePointsConfigPath

abstract string KlusterKite.NodeManager.Mock.MockResourceMigrator.ResourcePointsConfigPath
get

Gets the config path to the resource points

Definition at line 64 of file MockResourceMigrator.cs.

◆ ResourcesConfigPath

abstract string KlusterKite.NodeManager.Mock.MockResourceMigrator.ResourcesConfigPath
get

Gets the config path to the resources names

Definition at line 69 of file MockResourceMigrator.cs.


The documentation for this class was generated from the following file: