-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added watcher persistence interface * added watcher persistence oracle implementation (wip) * added watcher persistence interface to the DI * added watcher persistence interface to the webwatcher
- Loading branch information
1 parent
83fc6d9
commit e3670cf
Showing
6 changed files
with
67 additions
and
6 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
Elfo.Wardein.Abstractions/Watchers/IAmWatcherPersistenceService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Elfo.Firmenich.Wardein.Abstractions.Watchers | ||
{ | ||
public interface IAmWatcherPersistenceService | ||
{ | ||
Task<WatcherStatusResult> UpsertCurrentStatus(int watcherConfigurationId, int applicationId, int applicationHostname, bool isHealthy, Exception failureException = null); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Elfo.Wardein.Abstractions/Watchers/Models/WatcherStatusResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Elfo.Firmenich.Wardein.Abstractions.Watchers | ||
{ | ||
public class WatcherStatusResult | ||
{ | ||
public bool PreviousStatus { get; set; } | ||
public int FailureCount { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Elfo.Wardein.Core/Persistence/OracleWatcherPersistenceService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Elfo.Firmenich.Wardein.Abstractions.Watchers; | ||
using Elfo.Wardein.Core.Helpers; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Elfo.Firmenich.Wardein.Core.Persistence | ||
{ | ||
public class OracleWatcherPersistenceService : IAmWatcherPersistenceService | ||
{ | ||
private readonly OracleConnectionConfiguration oracleConnectionConfiguration; | ||
|
||
public OracleWatcherPersistenceService(OracleConnectionConfiguration oracleConnectionConfiguration) | ||
{ | ||
this.oracleConnectionConfiguration = oracleConnectionConfiguration; | ||
} | ||
|
||
public Task<WatcherStatusResult> UpsertCurrentStatus(int watcherConfigurationId, int applicationId, int applicationHostname, bool isHealthy, Exception failureException = null) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters