Table of Contents

Class HealthEndpoint

Namespace
Steeltoe.Management.Endpoint.Health
Assembly
Steeltoe.Management.EndpointBase.dll
public class HealthEndpoint : AbstractEndpoint<HealthEndpointResponse, ISecurityContext>, IEndpoint<HealthEndpointResponse, ISecurityContext>, IEndpoint, IHealthEndpoint
Inheritance
HealthEndpoint
Implements
Derived
Inherited Members
Extension Methods

Constructors

HealthEndpoint(IHealthOptions, IHealthAggregator, IEnumerable<IHealthContributor>, ILogger<HealthEndpoint>)

public HealthEndpoint(IHealthOptions options, IHealthAggregator aggregator, IEnumerable<IHealthContributor> contributors, ILogger<HealthEndpoint> logger = null)

Parameters

options IHealthOptions
aggregator IHealthAggregator
contributors IEnumerable<IHealthContributor>
logger ILogger<HealthEndpoint>

Properties

Options

public IHealthOptions Options { get; }

Property Value

IHealthOptions

Methods

BuildHealth(ISecurityContext)

protected virtual HealthEndpointResponse BuildHealth(ISecurityContext securityContext)

Parameters

securityContext ISecurityContext

Returns

HealthEndpointResponse

GetFilteredContributorList(string, IList<IHealthContributor>)

Filter out health contributors that do not belong to the requested group

protected IList<IHealthContributor> GetFilteredContributorList(string requestedGroup, IList<IHealthContributor> contributors)

Parameters

requestedGroup string

Name of group from request

contributors IList<IHealthContributor>

Full list of IHealthContributors

Returns

IList<IHealthContributor>

If the group is configured, returns health contributors that belong to the group.

If group can't be parsed or is not configured, returns all health contributors.

GetRequestedHealthGroup(ISecurityContext)

Returns the last value returned by GetRequestComponents(), expected to be the name of a configured health group

protected string GetRequestedHealthGroup(ISecurityContext securityContext)

Parameters

securityContext ISecurityContext

Last value of GetRequestComponents() is used as group name

Returns

string

GetStatusCode(HealthCheckResult)

public int GetStatusCode(HealthCheckResult health)

Parameters

health HealthCheckResult

Returns

int

Invoke(ISecurityContext)

public override HealthEndpointResponse Invoke(ISecurityContext securityContext)

Parameters

securityContext ISecurityContext

Returns

HealthEndpointResponse