public static BeatPulseContext AddVirtualMemorySizeLiveness(this BeatPulseContext context, long maximumMemoryBytes, string name = Constants.VirtualMemorySizeLiveness, string defaultPath = "virtualmemorysize") { return(context.AddLiveness(name, setup => { setup.UseLiveness(new MaximumValueLiveness <long>(maximumMemoryBytes, () => Process.GetCurrentProcess().VirtualMemorySize64)); })); }
public static BeatPulseContext AddOracle(this BeatPulseContext context, string connectionString, string name = nameof(OracleLiveness), string defaultPath = "oracle") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseLiveness(new OracleLiveness(connectionString)); })); }
public static BeatPulseContext AddWorkingSetLiveness(this BeatPulseContext context, long maximumMemoryBytes, string name = Constants.WorkingSetLiveness, string defaultPath = "workingset") { return(context.AddLiveness(name, setup => { setup.UseLiveness(new MaximumValueLiveness <long>(maximumMemoryBytes, () => Process.GetCurrentProcess().WorkingSet64)); })); }
public static BeatPulseContext AddBeatPulseGroup(this BeatPulseContext context, Uri uri, string defaultPath = "liveness", string name = nameof(BeatPulseLiveness)) { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseFactory(sp => new BeatPulseLiveness(uri, sp.GetService <ILogger <BeatPulseLiveness> >())); })); }
public static BeatPulseContext AddSqlite(this BeatPulseContext context, string sqliteConnectionString, string healthQuery, string name = nameof(SqliteLiveness), string defaultPath = "sqlite") { return(context.AddLiveness(name, setup => { setup.UseLiveness(new SqliteLiveness(sqliteConnectionString, healthQuery)); setup.UsePath(defaultPath); })); }
public static BeatPulseContext AddDocumentDb(this BeatPulseContext context, Action <DocumentDbOptions> options) { var documentDbOptions = new DocumentDbOptions(); options(documentDbOptions); context.Add(new DocumentDbLiveness(documentDbOptions)); return(context); }
public static BeatPulseContext AddDocumentDb(this BeatPulseContext context, Action <DocumentDbOptions> options, string defaultPath = "documentdb") { var documentDbOptions = new DocumentDbOptions(); options(documentDbOptions); context.AddLiveness(new DocumentDbLiveness(documentDbOptions, defaultPath)); return(context); }
public static BeatPulseContext AddSqlite(this BeatPulseContext context, string sqliteConnectionString, string healthQuery, string name = nameof(SqliteLiveness), string defaultPath = "sqlite") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseFactory(sp => new SqliteLiveness(sqliteConnectionString, healthQuery, sp.GetService <ILogger <SqliteLiveness> >())); })); }
public static BeatPulseContext AddIdentityServer(this BeatPulseContext context, Uri idSvrUri, string name = nameof(IdSvrLiveness), string defaultPath = "idsvr") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseLiveness(new IdSvrLiveness(idSvrUri)); })); }
public static BeatPulseContext AddAzureEventHub(this BeatPulseContext context, string connectionString, string eventHubName, string name = nameof(AzureEventHubLiveness), string defaultPath = "azureeventhub") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseFactory(sp => new AzureEventHubLiveness(connectionString, eventHubName, sp.GetService <ILogger <AzureEventHubLiveness> >())); })); }
public static BeatPulseContext AddAzureServiceBusQueue(this BeatPulseContext context, string connectionString, string queueName, string name = nameof(AzureServiceBusQueueLiveness), string defaultPath = "azureservicebusqueue") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseFactory(sp => new AzureServiceBusQueueLiveness(connectionString, queueName, sp.GetService <ILogger <AzureServiceBusQueueLiveness> >())); })); }
public static BeatPulseContext AddSqlServer(this BeatPulseContext context, string connectionString, string name = nameof(SqlServerLiveness), string defaultPath = "sqlserver") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseLiveness(new SqlServerLiveness(connectionString)); })); }
public static BeatPulseContext AddKafka(this BeatPulseContext context, Dictionary <string, object> config, string name = nameof(KafkaLiveness), string defaultPath = "kafka") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseFactory(sp => new KafkaLiveness(config, sp.GetService <ILogger <KafkaLiveness> >())); })); }
public static BeatPulseContext AddUrlGroup(this BeatPulseContext context, IEnumerable <Uri> uris, HttpMethod httpMethod, string defaultPath = "uri-group", string name = nameof(UriLiveness)) { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseLiveness(new UriLiveness(uris, httpMethod)); })); }
public static BeatPulseContext AddUrlGroup(this BeatPulseContext context, Uri uri, string defaultPath = "uri-group", string name = nameof(UriLiveness)) { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseLiveness(new UriLiveness(new System.Uri[] { uri }, HttpMethod.Get)); })); }
public static BeatPulseContext AddElasticsearch(this BeatPulseContext context, string url, string name = nameof(ElasticsearchLiveness), string defaultPath = "elasticsearchliveness") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseLiveness(new ElasticsearchLiveness(url)); })); }
public static BeatPulseContext AddRedis(this BeatPulseContext context, string redisConnectionString, string name = nameof(RedisLiveness), string defaultPath = "redis") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseFactory(sp => new RedisLiveness(redisConnectionString, sp.GetService <ILogger <RedisLiveness> >())); })); }
public static BeatPulseContext AddAzureServiceBusManagement(this BeatPulseContext context, string clientID, string clientSecret, string tenantID, string name = nameof(AzureServiceBusManagementLiveness), string defaultPath = "azureservicebusmanagementliveness") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseLiveness(new AzureServiceBusManagementLiveness(clientID, clientSecret, tenantID)); })); }
public static BeatPulseContext AddNpgSql(this BeatPulseContext context, string npgsqlConnectionString, string name = nameof(NpgSqlLiveness), string defaultPath = "npgsql") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseLiveness(new NpgSqlLiveness(npgsqlConnectionString)); })); }
public static BeatPulseContext AddRedis(this BeatPulseContext context, string redisConnectionString, string name = nameof(RedisLiveness), string defaultPath = "redis") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseLiveness(new RedisLiveness(redisConnectionString)); })); }
public static BeatPulseContext AddMySql(this BeatPulseContext context, string connectionString, string name = nameof(MySqlLiveness), string defaultPath = "mysql") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseFactory(sp => new MySqlLiveness(connectionString, sp.GetService <ILogger <MySqlLiveness> >())); })); }
public static BeatPulseContext AddAzureServiceBusTopic(this BeatPulseContext context, string connectionString, string topicName, string name = nameof(AzureServiceBusTopicLiveness), string defaultPath = "azureservicebustopic") { return(context.AddLiveness(name, setup => { setup.UseLiveness(new AzureServiceBusTopicLiveness(connectionString, topicName)); setup.UsePath(defaultPath); })); }
public static BeatPulseContext AddAzureBlobStorage(this BeatPulseContext context, string connectionString, string name = nameof(AzureBlobStorageLiveness), string defaultPath = "azureblobstorage") { return(context.AddLiveness(name, setup => { setup.UseLiveness(new AzureBlobStorageLiveness(connectionString)); setup.UsePath(defaultPath); })); }
public static BeatPulseContext AddAzureEventHub(this BeatPulseContext context, string connectionString, string eventHubName, string name = nameof(AzureEventHubLiveness), string defaultPath = "azureeventhub") { return(context.AddLiveness(name, setup => { setup.UseLiveness(new AzureEventHubLiveness(connectionString, eventHubName)); setup.UsePath(defaultPath); })); }
public static BeatPulseContext AddOracle(this BeatPulseContext context, string connectionString, string healthQuery = "select * from v$version", string name = nameof(OracleLiveness), string defaultPath = "oracle") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseFactory(sp => new OracleLiveness(connectionString, healthQuery, sp.GetService <ILogger <OracleLiveness> >())); })); }
public static BeatPulseContext AddNpgSql(this BeatPulseContext context, string npgsqlConnectionString, string healthQuery = "SELECT 1;", string name = nameof(NpgSqlLiveness), string defaultPath = "npgsql") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseFactory(sp => new NpgSqlLiveness(npgsqlConnectionString, healthQuery, sp.GetService <ILogger <NpgSqlLiveness> >())); })); }
public static BeatPulseContext AddRabbitMQ(this BeatPulseContext context, string rabbitMQConnectionString, string name = nameof(RabbitMQLiveness), string defaultPath = "rabbitmq") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseLiveness(new RabbitMQLiveness(rabbitMQConnectionString)); })); }
public static BeatPulseContext AddKafka(this BeatPulseContext context, Dictionary <string, object> config, string name = nameof(KafkaLiveness), string defaultPath = "kafka") { return(context.AddLiveness(name, setup => { setup.UseLiveness(new KafkaLiveness(config)); setup.UsePath(defaultPath); })); }
public static BeatPulseContext AddEventStore(this BeatPulseContext context, string connectionString, string login = null, string password = null, string name = nameof(EventStoreLiveness), string defaultPath = "eventstore") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseFactory(sp => new EventStoreLiveness(connectionString, login, password)); })); }
public static BeatPulseContext AddIdentityServer(this BeatPulseContext context, Uri idSvrUri, string name = nameof(IdSvrLiveness), string defaultPath = "idsvr") { return(context.AddLiveness(name, setup => { setup.UsePath(defaultPath); setup.UseFactory(sp => new IdSvrLiveness(idSvrUri, sp.GetService <ILogger <IdSvrLiveness> >())); })); }