KlusterKite
0.0.0
A framework to create scalable and redundant services based on awesome Akka.Net project.
|
Mock resource to test system migrations More...
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< ResourceId > | GetMigratableResources () |
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... | |
Mock resource to test system migrations
Definition at line 25 of file MockResourceMigrator.cs.
KlusterKite.NodeManager.Mock.MockResourceMigrator.MockResourceMigrator | ( | Config | config | ) |
Initializes a new instance of the MockResourceMigrator class.
config | The config. |
Definition at line 43 of file MockResourceMigrator.cs.
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.
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.
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.
|
protectedpure virtual |
Gets the redis key for specified resource
resourceId | The resource |
Implemented in KlusterKite.NodeManager.Mock.MockResourceMigratorDependent, and KlusterKite.NodeManager.Mock.MockResourceMigratorDependence.
|
protectedpure virtual |
Creates the resource name for the resource code
resourceCode | The resource code |
Implemented in KlusterKite.NodeManager.Mock.MockResourceMigratorDependent, and KlusterKite.NodeManager.Mock.MockResourceMigratorDependence.
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.
string KlusterKite.NodeManager.Mock.MockResourceMigrator.LatestPoint => this.GetAllPoints().Last() |
Definition at line 50 of file MockResourceMigrator.cs.
decimal KlusterKite.NodeManager.Mock.MockResourceMigrator.Priority => 1M |
Definition at line 59 of file MockResourceMigrator.cs.
|
get |
Definition at line 56 of file MockResourceMigrator.cs.
|
get |
Definition at line 53 of file MockResourceMigrator.cs.
|
get |
Gets the config path to the resource points
Definition at line 64 of file MockResourceMigrator.cs.
|
get |
Gets the config path to the resources names
Definition at line 69 of file MockResourceMigrator.cs.