healthep

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package healthep Contains implementation of health endpoint as a separate package to avoid cyclic package dependency.

Implementations in this package cannot be moved to package "actuator/health", otherwise, it could create cyclic package dependency as following:

actuator/health -> actuator -> security -> tenancy -> redis -> actuator/health

Therefore, any implementations involves package mentioned above should be moved here

Index

Constants

View Source
const (
	ID              = "health"
	EnableByDefault = true
)

Variables

View Source
var Module = &bootstrap.Module{
	Name:       "actuator-health-ep",
	Precedence: actuator.MinActuatorPrecedence,
	Options: []fx.Option{
		fx.Invoke(register),
	},
}

Functions

func Register

func Register()

Types

type CompositeHealthV2

type CompositeHealthV2 struct {
	health.SimpleHealth
	Components map[string]health.Health `json:"details,omitempty"`
}

type DefaultDisclosureControl

type DefaultDisclosureControl struct {
	// contains filtered or unexported fields
}

DefaultDisclosureControl implements health.DetailsDisclosureControl and health.ComponentsDisclosureControl

func (*DefaultDisclosureControl) ShouldShowComponents

func (c *DefaultDisclosureControl) ShouldShowComponents(ctx context.Context) bool

func (*DefaultDisclosureControl) ShouldShowDetails

func (c *DefaultDisclosureControl) ShouldShowDetails(ctx context.Context) bool

type EndpointOption

type EndpointOption struct {
	Contributor       health.Indicator
	StatusCodeMapper  health.StatusCodeMapper
	MgtProperties     actuator.ManagementProperties
	Properties        health.HealthProperties
	DetailsControl    health.DetailsDisclosureControl
	ComponentsControl health.ComponentsDisclosureControl
}

type EndpointOptions

type EndpointOptions func(opt *EndpointOption)

type HealthEndpoint

type HealthEndpoint struct {
	actuator.WebEndpointBase
	// contains filtered or unexported fields
}

HealthEndpoint implements actuator.Endpoint, actuator.WebEndpoint

func (*HealthEndpoint) Read

func (ep *HealthEndpoint) Read(ctx context.Context, _ *Input) (*Output, error)

Read never returns error

type Input

type Input struct{}

type Output

type Output struct {
	health.Health
	// contains filtered or unexported fields
}

func (Output) Body

func (o Output) Body() interface{}

Body web.BodyContainer

func (Output) MarshalJSON

func (o Output) MarshalJSON() ([]byte, error)

MarshalJSON json.Marshaler

func (Output) StatusCode

func (o Output) StatusCode() int

StatusCode http.StatusCoder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL