Click or drag to resize

Neon.Service Namespace

This namespace includes types that implement much of the boilerplate code for a service application suitable for deploying as a Docker container, a Kubernetes pod, or just a stand alone service.
Public classMetricsOptions
Specifies options for a NeonService. This is initialized to reasonable defaults.
Public classNeonService
Handy base class for application services. This class handles process termination signals when running on Linux, OS/X, and similar environments and also provides some features to help you run unit tests on your service.
Public classProcessTerminator
Gracefully handles SIGTERM signals sent to a process to terminate itself.
Public classServiceApiContact
Holds the contact information for a service API. This maps closely to the Microsoft.OpenApi.Models.OpenApiContact class.
Public classServiceApiInfo

Human readable metadata for a service API. This maps pretty closely to the Microsoft.OpenApi.Models.OpenApiInfo class which is used to by Swagger when generating ASP.NET documentation.

Note Note
We're not referencing the Microsoft.OpenApi nuget package to avoid adding about 166KB to applications using the Neon.Common assembly.f
Public classServiceApiLicense
Holds the license information for a service API. This maps closely to the Microsoft.OpenApi.Models.OpenApiLicense class.
Public classServiceDependencies
Used to specify other services that must be reachable via the network before a NeonService will be allowed to start. This is exposed via the Dependencies where these values can be configured in code before RunAsync(Boolean) is called or they can also be configured via environment variables as described in the remarks.
Public classServiceDescription
Describes a remote service.
Public classServiceEndpoint
Describes a network endpoint for remote service.
Public classServiceEndpoints
Holds the endpoint definitions for a service.
Public classServiceMap
Describes a collection of services deployed to Kubernetes or that run in a simulated unit test environment. This is simply a dictionary mapping case sensitive service names to ServiceDescription records for each service.
Public enumerationMetricsMode
Used control how or whether a NeonService publishes Prometheus metrics.
Public enumerationNeonServiceStatus
Enumerates the possible NeonService running states.
Public enumerationServiceEndpointProtocol
Enumerats the network protocols that can be implemented by a ServiceEndpoint.