servicers

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeHealthStats

func AnalyzeHealthStats(
	healthData *fegprotos.HealthStats,
	networkID string,
) (fegprotos.HealthStatus_HealthState, string, error)

AnalyzeHealthStats takes a HealthStats proto and determines if it is HEALTHY or UNHEALTHY based on the configuration for the provided networkID

func GetHealthConfigForNetwork

func GetHealthConfigForNetwork(networkID string) *healthConfig

Types

type HealthServer

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

func NewHealthServer

func NewHealthServer(factory blobstore.BlobStorageFactory) (*HealthServer, error)

func (*HealthServer) GetClusterState

GetClusterState takes a ClusterStateRequest containing a networkID and clusterID and returns the ClusterState or an error

func (*HealthServer) GetHealth

GetHealth fetches the health stats for a given gateway represented by a (networkID, logicalId)

func (*HealthServer) UpdateHealth

type HealthStatus

type HealthStatus int

type TestHealthServer

type TestHealthServer struct {
	HealthServer
	Feg1 bool //boolean to simulate requests coming from more than 1 FeG
}

A little Go "polymorphism" magic for testing

func NewTestHealthServer

func NewTestHealthServer(mockFactory blobstore.BlobStorageFactory) (*TestHealthServer, error)

func (*TestHealthServer) UpdateHealth

Health receiver for testHealthServer injects GW Identity into CTX if it's missing for testing without heavy mock of Certifier & certificate addition

Jump to

Keyboard shortcuts

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