store

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyedErrorHealthCheckSource

type KeyedErrorHealthCheckSource interface {
	KeyedErrorSubmitter
	status.HealthCheckSource
}

KeyedErrorHealthCheckSource tracks errors by key to compute health status. Only entries with non-nil errors are stored. When computing health status, the KeyedErrorHealthCheckSource will return a health status with state HealthStateHealthy if it has no error entries. If it has any error entries, it will return a health status with the state set to HealthStateError and params including all errors by their keys.

func NewKeyedErrorHealthCheckSource

func NewKeyedErrorHealthCheckSource(checkType health.CheckType, checkMessage string) KeyedErrorHealthCheckSource

NewKeyedErrorHealthCheckSource creates a health messenger that tracks errors by keys to compute health status.

type KeyedErrorSubmitter

type KeyedErrorSubmitter interface {
	// Submit stores non-nil errors by the provided key in a map; keys of submitted nil errors are
	// deleted from the map.
	Submit(key string, err error)
}

KeyedErrorSubmitter is not intended to be implemented separately - it simply provides consumers the ability to scope a method argument, such as a constructor, to provide only the Submit functionality of the KeyedErrorHealthCheckSource.

Jump to

Keyboard shortcuts

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