healthcheck

package
v1.79.3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Err defines sno service error.
	Err = errs.Class("healthcheck")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Details bool `user:"true" help:"Enable additional details about the satellite connections via the HTTP healthcheck." default:"false"`
	Enabled bool `` /* 135-byte string literal not displayed */
}

Config is the configuration for healthcheck service and endpoint.

type Endpoint

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

Endpoint handles HTTP request for health endpoint.

func NewEndpoint

func NewEndpoint(service *Service) *Endpoint

NewEndpoint creates a new HTTP endpoint.

func (*Endpoint) HandleHTTP

func (e *Endpoint) HandleHTTP(writer http.ResponseWriter, request *http.Request)

HandleHTTP manages the HTTP conversion for the function call.

type Health

type Health struct {
	Statuses   []SatelliteHealthStatus
	Help       string
	AllHealthy bool
}

Health represents the current status of the Storage ndoe.

type SatelliteHealthStatus

type SatelliteHealthStatus struct {
	OnlineScore    float64
	SatelliteID    storj.NodeID
	DisqualifiedAt *time.Time
	SuspendedAt    *time.Time
}

SatelliteHealthStatus is the health status reported by one satellite.

type Service

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

Service is handling storage node estimation payouts logic.

architecture: Service

func NewService

func NewService(reputationDB reputation.DB, serveDetails bool) *Service

NewService returns new instance of Service.

func (*Service) GetHealth

func (s *Service) GetHealth(ctx context.Context) (h Health, err error)

GetHealth retrieves current health status based on DB records.

Jump to

Keyboard shortcuts

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