TraGicCode / NServiceBus.CustomChecks.Http

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NServiceBus.CustomChecks.Http

Build status Nuget Nuget downloads License

Table of Contents

  1. Description
  2. How to use it
  3. How it works
  4. Development - Guide for contributing

Description

A Reusable NServiceBus CustomCheck to check the availability and connectivity of Http Endpoints.

How to use it

In order to begin using this custom check simply create a child class for each instance you would like to perform a healthcheck on.

namespace Ordering.Endpoint.CustomChecks
{
    public class GitHubHttpApiCustomCheck : HttpCustomCheck
    {
        private static TimeSpan repeat = TimeSpan.FromSeconds(5);
        private static string httpUrl = "https://api.github.com";
        
        public GitHubHttpApiCustomCheck(): base(url: httpUrl, id: $"Monitor {httpUrl}", "Third Party Dependency", repeat)
        {

        }
    }
}

Contributing

  1. Fork it ( https://github.com/tragiccode/NServiceBus.CustomChecks.Http/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

License:Apache License 2.0


Languages

Language:C# 100.0%