satellite

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

README

Satellite Provider

The Satellite Provider extends the platform-health server to enable delegation of health checks to another platform-health instance. It does this by querying the configured instance(s) and encapsulating the results.

Usage

Once the Satellite Provider is configured, any query to the platform health server will trigger validation of the configured Satellite instances. A instance is reported "healthy" if-and-only-if the satellite instance reports all of its instances as "healthy".

Configuration

The Satellite Provider is configured through the platform-health server's configuration file, with list of instances under the satellite key.

  • name (required): The name of the Satellite service instance, used to identify the service in the health reports.
  • host (required): The hostname or IP address of the Satellite service to monitor.
  • port (default: 8080): The port number of the Satellite service to monitor.
  • tls (default: false, unless port is 443): Enable TLS for the gRPC dialer.
  • insecure (default: false): Disable certificate validation when TLS is enabled.
Example
satellite:
  - name: example
    host: satellite.example.com
    port: 8080

In this example, the Satellite Provider will return the health of the platform-health server and its instances running on satellite.example.com:8080.

Documentation

Index

Constants

View Source
const TypeSatellite = "satellite"

Variables

This section is empty.

Functions

This section is empty.

Types

type Satellite

type Satellite struct {
	Name     string        `mapstructure:"name"`
	Host     string        `mapstructure:"host"`
	Port     int           `mapstructure:"port"`
	TLS      bool          `mapstructure:"tls"`
	Insecure bool          `mapstructure:"insecure"`
	Timeout  time.Duration `mapstructure:"timeout" default:"30s"`
}

func (*Satellite) GetHealth

func (i *Satellite) GetHealth(ctx context.Context) *ph.HealthCheckResponse

func (*Satellite) GetName

func (i *Satellite) GetName() string

func (*Satellite) GetType

func (i *Satellite) GetType() string

func (*Satellite) LogValue

func (i *Satellite) LogValue() slog.Value

func (*Satellite) SetDefaults

func (i *Satellite) SetDefaults()

Jump to

Keyboard shortcuts

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